Is it OK to use semph in vApplicationIdleHook

roujesky wrote on Wednesday, May 18, 2011:

Is it ok to do this in  vApplicationIdleHook?

xSemaphoreTake(xSemaphore, portMAX_DELAY);

I have another task which runs every second, prints the value of ulIdleCycleCount and then zeros it out.  Before I do this, it looks like about every 5 seconds, it does not get zero’d out, but still gets printed….
I know you cant delay in the idle task……

richard_damon wrote on Thursday, May 19, 2011:

No, the idle task, including the Idle Hook, may not Block. If the Idle task was to block, then the scheduler would not be able to find anything to run, and tends to just crash.

If you delay for 0, then it would be allowed, but then you would want to test for success before doing the give.

roujesky wrote on Friday, May 20, 2011: