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


Serial communication service & queue

Posted by GregK on May 19, 2007
Hello group.

I have a few question:

1. How to fast pure queue but not by

while (xQueueReceive(...) == pdTRUE )
{ /* Empty */}


2. I also need function to fast see what is in queue. I can only read but I need something to read from queue with leave item in queue. In particular I need it to serial communication service (UART, RS-232 etc.). It have to be fast.
Maybe it isn't good solution to use Queue from freeRTOS with size item equal 1 byte to serial communication service? What you think? What you use?

3. Can I use vTaskResume() from ISR? I can't find it in documentation.

RE: Serial communication service & queue

Posted by Dave on May 21, 2007

Don't know what you are asking, but there is no need to place the xQueueReceive() in a while loop if you are using a newer version of FreeRTOS.


Queue implementations in ISRs are not always a good idea. It is best to use the DMA of FIFO of the peripheral to capture data, then a semaphore to wake a task to process the data. This is much more efficient.


No - but there is a separate vTaskResumeFromISR() function that can be used. Generally waking tasks from interrupts is best done using a semaphore as you will not get into a situation where the task suspends as the ISR is calling Resume.

RE: Serial communication service & queue

Posted by GregK on May 22, 2007
1) Maybe, but how? How to fast clean Queue using freertos' API.

3) Now i see, indeed there is vTaskResumeFromISR() ..., strange, code-completion did not show me this function. (v4.1.3 and codeblocks 3960)
But You did not write why use semaphores is better then resume task.

[ 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