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] [January 2009 Threads] vApplicationIdleHook and xQueueReceivePosted by Karsten Klein on January 12, 2009 Hi, I have the following code:
void vApplicationIdleHook( void ) {
unsigned short temp; unsigned short queuemessage;
if (xQueueReceive(xQueueExtEepromApl2Idle, &queuemessage, 1)) { temp = 2;/* for test */ } else { temp = 1; /* for test */ }
The call of the function "xQueueReceive" causes an "Bus Error Data Fetch" - exception.
If i use the same in any other Task, everything seams to be fine.
Is it not possible to use the queues inside the vApplicationIdleHook() ?
Very you very much in advance Regards Karsten
}
RE: vApplicationIdleHook and xQueueReceivePosted by Dave on January 12, 2009 You cannot make a blocking function call in the idle hook. If you change the last parameter to 0 it will work. 0 means don't block to wait for data.
RE: vApplicationIdleHook and xQueueReceivePosted by Richard Damon on January 12, 2009 The Idle task is not allowed to block. The Idle hook runs as part of the Idle task
xQueueReceive, unless given a 0 timeout parameter might block, violating the above rule.
If Idle blocks, suddenly there is no task to run and schedule dies.
RE: vApplicationIdleHook and xQueueReceivePosted by Karsten Klein on January 12, 2009 Ok, I see. But does it work reliable if the xTicksToWait will be changed to 0 ?
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|