esp_register_freertos_tick_hook() verus FreeRTOS vApplicationTickHook()
Posted: Tue Jun 19, 2018 6:28 pm
Hi all
I need to setup a regular tick feature. The freeRTOS "vanilla" vApplicationTickHook() would work, but I see that the ESP-IDF provides it’s own time hook API (esp_register_freertos_tick_hook), one for each core. This seems like a better choice than the FreeRTOS option, but I can find very the little information on setting up the IDF versions (unless I've missed something in this forum - in which case I apologise for wasting your time) and none of the IDF examples seem to have code with the esp_register_freertos_tick_hook included.
so herewith:
1) I assume that esp_register_freertos_tick_hook() is setup in the configuration options, but which one/s?
2) I am assuming that the CONFIG_FREERTOS_HZ setting is for the freeRTOS "vanilla" vApplicationTickHook() and not the esp_register_freertos_tick_hook()? Or does it do both hooks, depending which one is activate / select?
3) I see that I can actively enable the CONFIG_FREERTOS_LEGACY_TICK_HOOK - does that mean that if this is not activated the ESP-IDF esp_register_freertos_tick_hook() is active?
4) Can I run esp_register_freertos_tick_hook() for each core concurrently?
5) and if yes, can I set a different tick frequency for each core?
many thanks
Frank
I need to setup a regular tick feature. The freeRTOS "vanilla" vApplicationTickHook() would work, but I see that the ESP-IDF provides it’s own time hook API (esp_register_freertos_tick_hook), one for each core. This seems like a better choice than the FreeRTOS option, but I can find very the little information on setting up the IDF versions (unless I've missed something in this forum - in which case I apologise for wasting your time) and none of the IDF examples seem to have code with the esp_register_freertos_tick_hook included.
so herewith:
1) I assume that esp_register_freertos_tick_hook() is setup in the configuration options, but which one/s?
2) I am assuming that the CONFIG_FREERTOS_HZ setting is for the freeRTOS "vanilla" vApplicationTickHook() and not the esp_register_freertos_tick_hook()? Or does it do both hooks, depending which one is activate / select?
3) I see that I can actively enable the CONFIG_FREERTOS_LEGACY_TICK_HOOK - does that mean that if this is not activated the ESP-IDF esp_register_freertos_tick_hook() is active?
4) Can I run esp_register_freertos_tick_hook() for each core concurrently?
5) and if yes, can I set a different tick frequency for each core?
many thanks
Frank