FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [May 2011 Threads] Is it OK to use semph in vApplicationIdleHookPosted by Robert H. Oujesky on May 18, 2011 Is it ok to do this in vApplicationIdleHook?
xSemaphoreTake(xSemaphore, portMAX_DELAY); ++ulIdleCycleCount; xSemaphoreGive(xSemaphore);
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.....
RE: Is it OK to use semph in vApplicationIdleHookPosted by Richard Damon on 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.
RE: Is it OK to use semph in vApplicationIdleHookPosted by Robert H. Oujesky on May 20, 2011 thanks!
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|