2023-11-09 05:46:05 -05:00
|
|
|
menu "ESP Timer (High Resolution Timer)"
|
2020-02-06 01:00:18 -05:00
|
|
|
|
|
|
|
config ESP_TIMER_PROFILING
|
|
|
|
bool "Enable esp_timer profiling features"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
If enabled, esp_timer_dump will dump information such as number of times the timer was started,
|
|
|
|
number of times the timer has triggered, and the total time it took for the callback to run.
|
|
|
|
This option has some effect on timer performance and the amount of memory used for timer
|
|
|
|
storage, and should only be used for debugging/testing purposes.
|
|
|
|
|
2020-10-20 02:09:32 -04:00
|
|
|
config ESP_TIME_FUNCS_USE_RTC_TIMER # [refactor-todo] remove when timekeeping and persistence are separate
|
|
|
|
bool
|
|
|
|
|
|
|
|
config ESP_TIME_FUNCS_USE_ESP_TIMER # [refactor-todo] remove when timekeeping and persistence are separate
|
|
|
|
bool
|
|
|
|
|
|
|
|
config ESP_TIME_FUNCS_USE_NONE # [refactor-todo] remove when timekeeping and persistence are separate
|
2020-07-22 03:23:39 -04:00
|
|
|
bool
|
|
|
|
|
2020-02-06 01:00:18 -05:00
|
|
|
config ESP_TIMER_TASK_STACK_SIZE
|
|
|
|
int "High-resolution timer task stack size"
|
|
|
|
default 3584
|
|
|
|
range 2048 65536
|
|
|
|
help
|
|
|
|
Configure the stack size of "timer_task" task. This task is used
|
|
|
|
to dispatch callbacks of timers created using ets_timer and esp_timer
|
|
|
|
APIs. If you are seing stack overflow errors in timer task, increase
|
|
|
|
this value.
|
|
|
|
|
|
|
|
Note that this is not the same as FreeRTOS timer task. To configure
|
|
|
|
FreeRTOS timer task size, see "FreeRTOS timer task stack size" option
|
2023-01-05 05:30:27 -05:00
|
|
|
in "FreeRTOS".
|
2020-02-06 01:00:18 -05:00
|
|
|
|
2020-02-10 06:56:04 -05:00
|
|
|
config ESP_TIMER_INTERRUPT_LEVEL
|
|
|
|
int "Interrupt level"
|
|
|
|
default 1
|
|
|
|
range 1 3 if IDF_TARGET_ESP32
|
|
|
|
range 1 1 if !IDF_TARGET_ESP32
|
|
|
|
help
|
2023-11-09 05:46:05 -05:00
|
|
|
This sets the interrupt priority level for esp_timer ISR.
|
|
|
|
A higher value reduces interrupt latency by minimizing the timer processing delay.
|
2020-02-10 06:56:04 -05:00
|
|
|
|
2023-01-05 05:30:27 -05:00
|
|
|
config ESP_TIMER_SHOW_EXPERIMENTAL
|
|
|
|
bool "show esp_timer's experimental features"
|
|
|
|
help
|
|
|
|
This shows some hidden features of esp_timer.
|
|
|
|
Note that they may break other features, use them with care.
|
|
|
|
|
|
|
|
config ESP_TIMER_TASK_AFFINITY
|
|
|
|
hex
|
|
|
|
default 0x0 if ESP_TIMER_TASK_AFFINITY_CPU0
|
|
|
|
default 0x1 if ESP_TIMER_TASK_AFFINITY_CPU1
|
|
|
|
default FREERTOS_NO_AFFINITY if ESP_TIMER_TASK_AFFINITY_NO_AFFINITY
|
|
|
|
|
|
|
|
choice ESP_TIMER_TASK_AFFINITY
|
|
|
|
prompt "esp_timer task core affinity"
|
|
|
|
default ESP_TIMER_TASK_AFFINITY_CPU0
|
|
|
|
help
|
|
|
|
The default settings: timer TASK on CPU0 and timer ISR on CPU0.
|
|
|
|
Other settings may help in certain cases, but note that they may break
|
|
|
|
other features, use them with care.
|
|
|
|
- "CPU0": (default) esp_timer task is processed by CPU0.
|
|
|
|
- "CPU1": esp_timer task is processed by CPU1.
|
|
|
|
- "No affinity": esp_timer task can be processed by any CPU.
|
|
|
|
|
|
|
|
config ESP_TIMER_TASK_AFFINITY_CPU0
|
|
|
|
bool "CPU0"
|
|
|
|
config ESP_TIMER_TASK_AFFINITY_CPU1
|
|
|
|
bool "CPU1"
|
|
|
|
depends on !FREERTOS_UNICORE && ESP_TIMER_SHOW_EXPERIMENTAL
|
|
|
|
config ESP_TIMER_TASK_AFFINITY_NO_AFFINITY
|
|
|
|
bool "No affinity"
|
|
|
|
depends on !FREERTOS_UNICORE && ESP_TIMER_SHOW_EXPERIMENTAL
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
choice ESP_TIMER_ISR_AFFINITY
|
|
|
|
prompt "timer interrupt core affinity"
|
|
|
|
default ESP_TIMER_ISR_AFFINITY_CPU0
|
|
|
|
help
|
|
|
|
The default settings: timer TASK on CPU0 and timer ISR on CPU0.
|
|
|
|
Other settings may help in certain cases, but note that they may break
|
|
|
|
other features, use them with care.
|
|
|
|
- "CPU0": (default) timer interrupt is processed by CPU0.
|
|
|
|
- "CPU1": timer interrupt is processed by CPU1.
|
|
|
|
- "No affinity": timer interrupt can be processed by any CPU. It helps
|
|
|
|
to reduce latency but there is a disadvantage it leads to the timer ISR
|
|
|
|
running on every core. It increases the CPU time usage for timer ISRs
|
|
|
|
by N on an N-core system.
|
|
|
|
|
|
|
|
config ESP_TIMER_ISR_AFFINITY_CPU0
|
|
|
|
bool "CPU0"
|
|
|
|
config ESP_TIMER_ISR_AFFINITY_CPU1
|
|
|
|
bool "CPU1"
|
|
|
|
depends on !FREERTOS_UNICORE && ESP_TIMER_SHOW_EXPERIMENTAL
|
|
|
|
config ESP_TIMER_ISR_AFFINITY_NO_AFFINITY
|
|
|
|
bool "No affinity"
|
|
|
|
depends on !FREERTOS_UNICORE && ESP_TIMER_SHOW_EXPERIMENTAL
|
|
|
|
endchoice
|
|
|
|
|
2020-02-10 08:45:09 -05:00
|
|
|
config ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD
|
|
|
|
bool "Support ISR dispatch method"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Allows using ESP_TIMER_ISR dispatch method (ESP_TIMER_TASK dispatch method is also avalible).
|
|
|
|
- ESP_TIMER_TASK - Timer callbacks are dispatched from a high-priority esp_timer task.
|
|
|
|
- ESP_TIMER_ISR - Timer callbacks are dispatched directly from the timer interrupt handler.
|
|
|
|
The ISR dispatch can be used, in some cases, when a callback is very simple
|
|
|
|
or need a lower-latency.
|
|
|
|
|
2021-12-14 06:01:19 -05:00
|
|
|
config ESP_TIMER_IMPL_TG0_LAC
|
|
|
|
bool
|
|
|
|
default y
|
|
|
|
depends on IDF_TARGET_ESP32
|
2020-02-06 01:00:18 -05:00
|
|
|
|
2021-12-14 06:01:19 -05:00
|
|
|
config ESP_TIMER_IMPL_SYSTIMER
|
|
|
|
bool
|
|
|
|
default y
|
|
|
|
depends on !IDF_TARGET_ESP32
|
2020-02-06 01:00:18 -05:00
|
|
|
|
|
|
|
endmenu # esp_timer
|