Short delay in task

Is it possible to call some delay() function with such loop           (for i = 0; i < delay; i++) in task to get shorter delay/wait time than vTaskDelay()? I am trying this on LPC2106 with gcc 4.1.1 and it doesn’t seem to work. Thanks for comments.   Best regards       Vit Mares

Short delay in task

The loop does not contain any blocking calls so you are just looping in a task with no context switching.  If i is not declared volatile then the compiler might just optimize it away.  You could put a vTaskDelay(0) call in the loop.