Quality RTOS & Embedded Software

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




Loading

Edge triggered queue

Posted by beginend1 on January 9, 2014

Problem is to solve classic race condition in single data producer and multiple consumer model in double buffering. 1st task is generating some data (eg. gsensor) other tasks are reading those data.

Target is to inform all waiting tasks that there is new data, or pass data directly to those tasks and do not "miss" any sample or inform task that he missed a data and return old one.

Is there a simple way to do that in FreeRTOS 7.5.2 without creating a queue for every task? Edge triggered everwitable queue would be very handy here.


Edge triggered queue

Posted by edwards3 on January 9, 2014

It might be something you can do in version 8 using an event group. You could use the xQueueOverwrite() function to post a message, have each task use xQueuePeek() to view the message, and the xEventGropuSync() function to create a synchronisation point after each task has read the new data. http://www.freertos.org/xEventGroupSync.html


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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