We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
As I understand it - in FreeRTOS, I can call xTaskGetTickCount to get the count of ticks since vTaskStartScheduler was called. This is effectively a system time in ticks. If the ticks are set to 1 ms, then this is the number of ms since we started - which is handy for computing time deltas and such.
What is the corresponding way to do this in CMSIS RTOS v2? I thought it would be OS_Tick_GetCount, but this is not correct - this is the value of the counter within each tick - not the number of ticks.
Do I just set up my own counter via OS_Tick_Setup? I wondered if that was somehow in use already by the FreeRTOS implementation underneath - but, it doesn't appear to be called anywhere in my codebase.
www.keil.com/.../group__CMSIS__RTOS__KernelCtrl.html
Use osKernelGetTickCount().
Beware of overflow when using it as it is only 32 bit
That is exactly what I was thinking. Thank you for the reply.
five nights at freddy's