cancel
Showing results for 
Search instead for 
Did you mean: 

How do I notify a freeRTOS Task that a global variable or Mailbox has changed?

LMorr.3
Senior II

For my example, I have 3 tasks; UserInterfaceTask.c, WorkerTask.c and ControllerTask.c. When a user pushes a button the UserInterfaceTask detects it and sends a Queue message to the ControllerTask. The ControllerTask then updates a global Mailbox which any tasks, including WorkerTask.c can access via xQueuePeek() however how do I notify the WorkerTask that a new value has been changed by ControllerTask using xQueueOverwrite()? My WorkerTask is polling, so is it acceptable to poll xQueuePeek() every 1 or 2ms or is there a cleaner way to be notified of changes to global variable or mailbox values?

Thank you

2 REPLIES 2

This is really a question for FreeRTOS - not specific to STM32:

https://www.freertos.org/Documentation/RTOS_book.html

https://www.freertos.org/RTOS-contact-and-support.html

https://www.freertos.org/community/overview.html

Note that there is a free Windows simulator - so you can learn FreeRTOS without all the added complications of an embedded microcontroller target:

https://www.freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html

I agree. For some reason, I still cannot post on freeRTOS. The community moderator has not given me permission as a new user, and I emailed them 3 times now over the last few weeks asking why I cannot post. No response. I just logged in at freertos again and confirmed I cannot post questions.

UPDATE: I was able to get into freeRTOS community support. The solution was to stay logged in for about 1/2 hour while navigating posts and was automatically 'upgraded' to be allowed to post new topics.