![]() Because all the callbacks are dispatched from the same task, it is recommended to only do the minimal possible amount of work from the callback itself, posting an event to a lower-priority task using a queue instead. Timer callbacks are dispatched from a high-priority esp_timer task. Available only if CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is enabled (by default disabled).ĮSP_TIMER_TASK. Timer callbacks can be dispatched by two methods:ĮSP_TIMER_ISR. The exact hardware timer implementation used depends on the target, where LAC timer is used for ESP32. Internally, esp_timer uses a 64-bit hardware timer. Raising the timer interrupt’s priority can reduce the timer processing delay caused by interrupt latency.Įsp_timer set of APIs provides one-shot and periodic timers, microsecond time resolution, and 64-bit range. The hardware timer interrupt’s priority is configured via the CONFIG_ESP_TIMER_INTERRUPT_LEVEL option (possible priorities being 1, 2, or 3). This necessitates the creation of an additional system on top of the hardware timer to keep track of pending events and ensure that callbacks are executed when the corresponding hardware interrupts occur. For instance, application components may require timer events to be triggered at specific future times, but hardware timers typically have only one “compare” value for interrupt generation. This task can be preempted by other tasks, leading to decreased precision and accuracy.Īlthough hardware timers are not subject to the limitations mentioned, they may not be as user-friendly. Timer callbacks are dispatched from a low-priority timer service (i.e., daemon) task. Maximum resolution is equal to the RTOS tick period Memory Management for MMU Supported MemoryĪlthough FreeRTOS provides software timers, FreeRTOS software timers have a few limitations:.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |