This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FreeRTOS timers may fire earlier than expected when configUSE_TICKLESS_IDLE == 1

Hi all,
I am using nrf52 with Softdevice 113 v7.0.1 and SDKv16 and FreeRTOS v10.0.1 and I am experiencing some issues with FreeRTOS timers expiring earlier than expected when configUSE_TICKLESS_IDLE == 1.

The problems started occurring when I applied fix in vTaskStepTick() proposed in the FreeRTOS forum: https://forums.freertos.org/t/assert-in-tasks-c-2611-on-xtickcount-wrap-around/9984
There were two solutions proposed, one in the Nordic port and the seconds in generic FreeRTOS code, but both of them cause the same problem.

I also created the corresponding post in the FreeRTOS forum: forums.freertos.org/.../13416

So is there any solution that fixes the original problem with assert on xTickCount wrap around that will not cause timers to expire too early?

Related