Cant receive from the queue

tjohansen wrote on Tuesday, January 17, 2012:

Hi

I have a strange problem. I have created an queue.

I post on the queue every 1 sec with task 1 using:
xQueueSend(g_xRXEvent, (void*)&nAll, ( portTickType ) 10);
The function do succeed every time.

In task 2 I try to receive the queue message using the xQueueReceive
while(TRUE)
{
if(pdTRUE == xQueueReceive (g_xRXEvent, &nRXBufferIndex, portMAX_DELAY))
{
                   …. Do stuff

The xQueueReceive never returns?
When the scheduler is started, the xQueueReceive do return in task 2 the first time, but that is before anything is send to the queue by task 1.?

The two task have the same priority
I’m running 7.1.0 on a LPC2478

Thomas

tjohansen wrote on Tuesday, January 17, 2012:

I may add, that other queue seems to work. I have a UART isr using xQueueSendFromISR that is working.

Thomas