Quality RTOS & Embedded Software

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


Loading

xQueueReceive : how to block with xTicksToWai

Posted by ch2 on January 24, 2006
I would like to block forever one task using xQueueReceive if it never received data in the queue : what should I put in xTicksToWait?
Thanks

RE: xQueueReceive : how to block with xTicksToWai

Posted by Richard on January 24, 2006
What you have to do is put the call to xQueueReceive into a loop as:

while( !xQUeueReceive( ... ) );

using portMAX_DELAY as the delay period. The while loop will then only exit when data is available.

Regards.

RE: xQueueReceive : how to block with xTicksToWai

Posted by ch2 on January 24, 2006
thanks for your quick & precise answer.
I have another question :
I receive data on the HDLC port from the STR710 and during the IRQ HDLC I'm storing this data one byte after another one int the queue. And I have one task which is waiking up when there is data in the queue : will this task wake up after the irq wrote 1 byte in the queue or at the end of the IRQ?
Thanks
chris


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


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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

Xilinx Microblaze and Zynq partner