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.
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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.