abdull wrote on Thursday, May 23, 2019:
I have a task that keeps printing some characters in an infinite loop and I have implemented a delay before each printing iteration using vTaskDelayUntil, but for some reason the delay isn’t working properly.
this is how I specify the vTaskDelayUnti parameters.
portTickType wakeTime;
wakeTime = xTaskGetTickCount();
and this is what the task does (it only prints BYE infinitly)
void print()
{
while(1)
{
vTaskDelayUntil( &wakeTime, 3000 );
printf("BYE\n");
}
}
This is how the task is created.
xTaskCreate(print, (const signed char*) "print", 1024, NULL, 3, &printH);
The screen shot below shows the output that I got. The characters do not follow the delay specified initially, and when it reaches the part where it looses the character E it starts to follow the delay specified.
Any idea for why the vTaskDelayUntil is not working in a propper way. Appreciated.
Regards,
abdul.