Quality RTOS & Embedded Software

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




Loading

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.

http://www.freertos.org/scheduling-coroutines-with-tasks.html

Help!

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.

Regards.


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists