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


How to use taskNotify to replace xEventGroupGetBits()

Posted by liangmiao on June 20, 2017

I'm new to freeRTOS. I'm looking for a taskNotify function that can replace xEventGroupGetBits(), i.e. query the notification without blocking or waiting.

According to freeRTOS documentation (http://www.freertos.org/ulTaskNotifyTake.html), an RTOS task can use ulTaskNotifyTake() to [optionally] block to wait for a the task's notification value to be non-zero. So it sounds there is an option not to block, but I'm not quite sure how. I was thinking to set the xTicksToWait to "0", but apparently the document says it must be a number that is greater than "0".

Cheers Liang

How to use taskNotify to replace xEventGroupGetBits()

Posted by rtel on June 20, 2017

As far as I recall, all blocking API functions can accept a block time of 0. Please provide a reference to the documentation that says this is not the case.

How to use taskNotify to replace xEventGroupGetBits()

Posted by liangmiao on June 20, 2017

Thanks for the prompt reply.

I checked the manual again and can't find the restriction. I was probably looking at the wrong doc previously, appologize for the confusion. If "0" is the valid value for the wait time, then that's exact what I wanted. Thanks for the help.

[ 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