Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Cant receive from the queue

Posted by Thomas Johansen on 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

RE: Cant receive from the queue

Posted by Thomas Johansen on January 17, 2012
I may add, that other queue seems to work. I have a UART isr using xQueueSendFromISR that is working.

Thomas


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS