FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [May 2007 Threads] Serial communication service & queuePosted 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 & queuePosted 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 & queuePosted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|