Quality RTOS & Embedded Software

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


Cannot xQueueSend then crQUEUE_RECEIVE

Posted by Michael Carr on September 8, 2007
I just posted a bug that I couldn't add to a queue in a Task using xQueueSend and then retrieve from the queue in a coroutine using crQUEUE_RECEIVE. The reply to the bug was "This is not a bug. Unfortunately, tasks and co-routines cannot share a
queue or semaphore." If this is the case, I think the documentation should be modified to reflect this restriction, perhaps referring to "Task Queue" and "Coroutine Queue". Currently the documentation doesn't differentiate between Queue types.

RE: Cannot xQueueSend then crQUEUE_RECEIVE

Posted by Richard on September 8, 2007
I have to agree that the documentation was not as clear on this matter as it could be. I have added:

"Note that co-routines can only send data to other co-routines. A co-routine cannot use a queue to send data to a task or visa versa"

to the crSEND and crRECEIVE pages, and:

" Note that an application can be designed using just tasks, just co-routines, or a mixture of both - however tasks and co-routines use different API functions and therefore a queue (or semaphore) cannot be used to pass data from a task to a co-routine or visa versa."

to the page describing the differences between tasks and co-routines.


RE: Cannot xQueueSend then crQUEUE_RECEIVE

Posted by Michael Carr on September 8, 2007
Thank you, that clarifies the issue and will be helpful to others.

RE: Cannot xQueueSend then crQUEUE_RECEIVE

Posted by sashiono on September 12, 2007
I feel that it greatly reduces the functionality of co-routines that you cannot passed data between queues from a co-routine to a task. What causes it limitation and it there a way to connect the queues between the two?

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

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

Latest News

Version 10.1.0 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

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

Xilinx Microblaze and Zynq partner