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

Task delay faster that expected

Hi, 

I am using nRF52832, SDK 15. My code is based on the freeRTOS code examples.

I am trying to Run my Task Every 10 ms. I tried to test this by using a counter to print every minute. And every minute ,the notification appears after 58.6 seconds. 

To Run my Task i am using this function vTaskDelayUntil(&LastWakeTime, pdMS_TO_TICKS(10)); the variable LastWakeTime is been initialized with LastWakeTime = xTaskGetTickCount();

It seemed that the Delay for 10.24 (10) ticks (10 ms) could it cause system clock to be faster ? 

If i will change the configTICK_RATE_HZ to a round number (2000 for example) would it have any performance downside? (not being a power of 2)  and would it solve this?

Thanks A lot 

ibrahim

Related