feat(freertos/idf): Add config option for FreeRTOS Timer Task core affinity

This commit adds the ability to set the core affinity for the FreeRTOS
Timer Service task when multi-core configuration is enabled. This commit
also adds a Kconfig option to set the core affinity of the timer task
via the menuconfig.

Closes https://github.com/espressif/esp-idf/issues/10315
This commit is contained in:
Sudeep Mohanty
2023-10-24 11:59:40 +02:00
parent dd5b091a8b
commit f01dbe0314
5 changed files with 114 additions and 35 deletions

View File

@@ -166,6 +166,27 @@ menu "FreeRTOS"
help
Sets the timer task's name (see configTIMER_SERVICE_TASK_NAME documentation for more details).
choice FREERTOS_TIMER_SERVICE_TASK_CORE_AFFINITY
prompt "configTIMER_SERVICE_TASK_CORE_AFFINITY"
default FREERTOS_TIMER_TASK_NO_AFFINITY
help
Sets the timer task's core affinity (see configTIMER_SERVICE_TASK_CORE_AFFINITY documentation for more details).
config FREERTOS_TIMER_TASK_AFFINITY_CPU0
bool "CPU0"
config FREERTOS_TIMER_TASK_AFFINITY_CPU1
bool "CPU1"
depends on !FREERTOS_UNICORE
config FREERTOS_TIMER_TASK_NO_AFFINITY
bool "No affinity"
endchoice
config FREERTOS_TIMER_SERVICE_TASK_CORE_AFFINITY
hex
default 0x0 if FREERTOS_TIMER_TASK_AFFINITY_CPU0
default 0x1 if FREERTOS_TIMER_TASK_AFFINITY_CPU1
default FREERTOS_NO_AFFINITY if FREERTOS_TIMER_TASK_NO_AFFINITY
config FREERTOS_TIMER_TASK_PRIORITY
int "configTIMER_TASK_PRIORITY"
range 1 25