Tick count overflow

mike-ascend wrote on Wednesday, May 23, 2018:

Hello all,

I just wanted to confirm what would happen if the rtos was running for a period of time such that the tick count overflowed.

My system uses a Microblaze soft core CPU and the tick count is 32 bits wide and uses FreeRTOS 8.2.3

The document FreeRTOS Reference Referance Manual states: “The tick count will eventually overflow and return to zero. This will not affect the internal operation of the kernel.”

However, this is for version 10.0. Can the same be said for version 8.2.3?


rtel wrote on Wednesday, May 23, 2018:

Yes - this has always been the case. Tick count overflows have always
been accounted for internally within the kernel itself, but naturally if
you use the raw tick count value directly in your code then you need to
account for it too. Functions such as vTaskSetTimeoutState() and
xTaskCheckForTimeout() help there too: