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!
Hi.
There is actually no need for those functions in FreeRTOS.
Instead, you can use
xTaskGetTickCount - which returns the count of ticks since vTaskStartScheduler was called.
(Ref: https://www.freertos.org/a00021.html#xTaskGetTickCount)
When using an RTOS, it is best to use RTOS features as much as possible.
Best regards,
Joakim
Hi.
There is actually no need for those functions in FreeRTOS.
Instead, you can use
xTaskGetTickCount - which returns the count of ticks since vTaskStartScheduler was called.
(Ref: https://www.freertos.org/a00021.html#xTaskGetTickCount)
When using an RTOS, it is best to use RTOS features as much as possible.
Best regards,
Joakim
Hi Joakim,
Thanks for the reply. Actually I agree that its best to use RTOS features, however currently when I include auth_tracker.c into the project its asking me for the following function:
so shall we add them to app_timer_freertos.c implementation?
Regards,
Sergey
You are right Sergy,
Exclude the direct dependency of your app with RTC by including app_timer_freertos.c and let FreeRTOS take control on the tick. Your app actually can purely use freertos timers if you wish, but if you do not want to change the app_timer code, then it is understandable and just replace app_timer.c with app_timer_freertos.c in your project
Susheel, thats exactly what I did indeed, just its missing the above named functions. May be its a good idea to add them for compatibility :)
Hi Susheel Nuguru,
I am getting the same error with app_timer_cnt_diff_compute and app_timer_cnt_get (referred from auth_status_tracker.o). I have already included app_timer_freertos.c and app_timer.c isn't present in my project.
Do I need to edit app_timer_freertos.c with something like this?
uint32_t app_timer_cnt_get(void) { return xTaskGetTickCount(); }
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.