diff --git a/Kconfig.projbuild b/Kconfig.projbuild index 10bbf25181e..aeb26d0b61c 100644 --- a/Kconfig.projbuild +++ b/Kconfig.projbuild @@ -82,6 +82,9 @@ config ARDUINO_UDP_RUNNING_CORE default 1 if ARDUINO_UDP_RUN_CORE1 default -1 if ARDUINO_UDP_RUN_NO_AFFINITY +config CONFIG_ARDUINO_UDP_TASK_PRIORITY + int + default 3 config DISABLE_HAL_LOCKS bool "Disable mutex locks for HAL" diff --git a/libraries/AsyncUDP/src/AsyncUDP.cpp b/libraries/AsyncUDP/src/AsyncUDP.cpp index 762529b9e0f..ea2fc04e744 100644 --- a/libraries/AsyncUDP/src/AsyncUDP.cpp +++ b/libraries/AsyncUDP/src/AsyncUDP.cpp @@ -150,7 +150,7 @@ static bool _udp_task_start(){ } } if(!_udp_task_handle){ - xTaskCreateUniversal(_udp_task, "async_udp", 4096, NULL, 3, (TaskHandle_t*)&_udp_task_handle, CONFIG_ARDUINO_UDP_RUNNING_CORE); + xTaskCreateUniversal(_udp_task, "async_udp", 4096, NULL, CONFIG_ARDUINO_UDP_TASK_PRIORITY, (TaskHandle_t*)&_udp_task_handle, CONFIG_ARDUINO_UDP_RUNNING_CORE); if(!_udp_task_handle){ return false; } diff --git a/tools/sdk/include/config/sdkconfig.h b/tools/sdk/include/config/sdkconfig.h index 8722dcc6987..8bf6c1416aa 100644 --- a/tools/sdk/include/config/sdkconfig.h +++ b/tools/sdk/include/config/sdkconfig.h @@ -364,6 +364,7 @@ #define CONFIG_MB_TIMER_PORT_ENABLED 1 #define CONFIG_DUPLICATE_SCAN_CACHE_SIZE 20 #define CONFIG_ARDUINO_UDP_RUNNING_CORE 1 +#define CONFIG_ARDUINO_UDP_TASK_PRIORITY 3 #define CONFIG_MONITOR_BAUD_OTHER_VAL 115200 #define CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF 1 #define CONFIG_ESPTOOLPY_PORT "/dev/cu.usbserial-DO00EAB0" diff --git a/tools/sdk/sdkconfig b/tools/sdk/sdkconfig index 4cdb6a8c2ec..521fb85812e 100644 --- a/tools/sdk/sdkconfig +++ b/tools/sdk/sdkconfig @@ -36,6 +36,7 @@ CONFIG_ARDUINO_UDP_RUN_CORE0= CONFIG_ARDUINO_UDP_RUN_CORE1=y CONFIG_ARDUINO_UDP_RUN_NO_AFFINITY= CONFIG_ARDUINO_UDP_RUNNING_CORE=1 +CONFIG_ARDUINO_UDP_TASK_PRIORITY=3 CONFIG_DISABLE_HAL_LOCKS= #