Quality RTOS & Embedded Software

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


Synchronised Communication between Coroutines and Tasks

Posted by tharun960 on June 4, 2014

Hey everyone

I was wondering how we can communicate between tasks and coroutines. E.g. my tasks pass semaphores around to let each other know when to perform a certain action such as sending a radio packet.. I'd like to implement one of my tasks as a co-routine as it only runs ocassionally.. But if it was a co-routine it couldn't simply pass a semaphore to one of my other tasks since co-routines and tasks can't communicate with each other using queues/semaphores in freertos..

So what can I do? I'd prefer not to set a global flag as that seems to be defeating the point of using freertos and the semaphores/queues functionality that comes with it..? That's my understanding of this stuff anyway.. Feel free to correct anything I've said that is wrong!

The following page on the freertos website says you can mix tasks and co-routines and then provides a link as to how to do this but this link takes you back to the page you are already on.. Try it haha.



Thanks Everyone

Synchronised Communication between Coroutines and Tasks

Posted by rtel on June 7, 2014

Sorry for the late reply - I simply didn't see your post.

As far as I recall tasks and co-routines cannot communicate using FreeRTOS primitives such as queues - they can only communicate between themselves.

Co-routines are not used that much these days as they were really designed for MCUs with tiny amounts of RAM.


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

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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 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