Is there implementation of these functions available for Freertos version of app_timer?
app_timer_cnt_get()
app_timer_cnt_diff_compute()
they are required for LESC operations.
Thanks!
Is there implementation of these functions available for Freertos version of app_timer?
app_timer_cnt_get()
app_timer_cnt_diff_compute()
they are required for LESC operations.
Thanks!
I am having the same issue using app_timer_freertos with the libuarte library. I'm using freertos, the softdevice and 2 uarte's, so there are not enough rtc's to go around. I need to use app_timer, but libuarte uses functions which are in app_timer.c, and missing from app_timer_freertos.c. These 2 functions should be added for compatibility.
This issue is still present in the latest SDK 17.1.0. Is it planned to be fixed?
I came up on the same issue while using libuarte with FreeRTOS. Interesting to see that these two functions are not implemented already inside app_timer_freertos.c
One of the functions was given by Ali so I added the other one by copying from app_timer.c
Here you can find both of them:
uint32_t app_timer_cnt_get(void) { return xTaskGetTickCount(); } uint32_t app_timer_cnt_diff_compute(uint32_t ticks_to, uint32_t ticks_from) { return ((ticks_to - ticks_from) & RTC_COUNTER_COUNTER_Msk); }
You don't have to edit app_timer_freertos.c though. You can also define them in your main.c