I have some function require precious time delay, it maybe at any task with different priority. I am not sure how to do it properly in RTOS.
For example I need a 100mS pulse, the code as below:
vTaskDelay( 10_Ticks); // 100 mS delay.
If those code in low priority task, the pulse will be longer than 100mS, because after “vTaskDelay( 10_Ticks)” the CPU may execute other higher priority tasks.