FreRTOS timer i confgured for 1s to toggle led works fine for a while, then toggles at less than 1s

Hi, i have created a timer, which auto reloads at every 1s, it works fine for some times, but then it starts toggling led at time period less than 1sec. What is the issue ?

Note:
I custom defined pdMS_TO_TICKS to: pdMS_TO_TICKS to ( ( TickType_t ) ( xTimeInMs ) ), because my configTICK_RATE_HZ is 1000
The task which created this timer goes to blocked state using vTaskDelay. for over 24 hours.

Show your code. No point in guessing.

1 Like

How did you determine this? Also, please share code as @RAc asked.

1 Like

How much less than 1s? Is the error < 1 tick?

1 Like

Sorry for the delay, actually found the issue, you see i started the timer in the task loop, and the loop iterates every 24 hour, so after 24 hour the loop starts the timer without stopping it. It was a silly mistake from my side, havent given a proper error validation which caused this.

1 Like

Thank you for reporting back!

2 Likes