Quality RTOS & Embedded Software

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


Loading

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
1)

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.

2)

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.

3)

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 ]    [ 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