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] [June 2013 Threads] rewrite queue struct or use freertos queuePosted by gurushen on June 13, 2013 Hi, I need a queue structure for passing bytes for a uart driver. I was using the freertos queue implementation but a co-worker insist on writing our own queue struct. Is there any benefit of rewriting our own?
RE: rewrite queue struct or use freertos queuePosted by Richard Damon on June 13, 2013 It might be possible to write a slightly more efficient queue knowing that one end is alway an interrupt routine, and maybe some others knowable special cases (like it is always 1 byte at a time being sent, if that is how you are doing it). I am not sure if the improvements are worth the extra work and risk of bugs.
RE: rewrite queue struct or use freertos queuePosted by Jack Peacock on June 15, 2013 While the FreeRTOS queue works well and is easy to use it does have some drawbacks. It's oriented toward one character at a time rather than block transfers. I did go the separate FIFO driver route in order to minimize interrupt overhead. I read and write blocks of data through a FIFO, also making use of DMA to reduce USART TX interrupts by as much as 100 to 1 (sending large Modbus messages).
If your data rate is low use the FreeRTOS queue, but if you have a high data rate your co-worker is right...roll your own buffer management. USART interrupt overhead can be significant. Jack Peacock
RE: rewrite queue struct or use freertos queuePosted by Richard on June 15, 2013 “It's oriented toward one character at a time rather than block transfers” A queue can be created to hold blocks of any size, although each block in a queue has to be the same size. To queue really large blocks you would queue a pointer to the block instead of the block itself. The FreeRTOS queues are designed for their purpose. Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|