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


TaskNotification or Event groups

Posted by rrrum on July 13, 2016


I would like to ask for a opinion, it is a design issue and I am not able to find among many different mechanisms the right one for my task:

  1. Let’s focus on 3 tasks, A, B1, B2

  2. Task A is implemented as follows: waits on its “command queue” and there is also timeout set to allow it to run periodically to do some work if no commands are present.

  3. Task A is controlling also B1 and B2, at some point task A writes to receive queues of B1 and B2 which unblock and B1 or B2 or both run

  4. Each task B1 and B2 should set some flag, showing task is running

  5. It can take undefined amount of time to complete B1 or B2, when completed, each task resets its “running flag”

  6. Now task A, at some point in the “periodic” run section, should check if tasks B1 and B2 completed their job (running flag not set), if both are finished it should perform some action, otherwise is should just continue executing periodic stuff.

So I wonder if task notification mechanism or event groups can be used for this purpose or what is the most suitable/efficient mechanism for this design problem.

Thank you


TaskNotification or Event groups

Posted by hs2sf on July 14, 2016

IMO notifications should be sufficient for this design. I've developed a pretty similar system purely using notifications b/c they are by far the fastest and smallest IPC mechanism available in FreeRTOS (you can disable almost all other OS features). I think event_groups are an overkill. But if you're a lucky boy having no constraints regarding performance and code size you can choose the most convenient IPC :) Good luck !

[ 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