FreeRTOS uart1 to uart2

I want to transfer data from serial port 1 to serial port 2, and then transfer serial port 2 to serial port 1 in FreeRTOS.
Is there an easy way to achieve this or still have to use a queue.

Assuming you don’t have a DMA then the most efficient way would be to have the receive interrupt for uart 1 to write received bytes directly to uart 2, and vice
versa. Failing that a FreeRTOS stream buffer would be much more efficient than a queue - some FreeRTOS demos uses queues for this but only as a test as it deliberately loads the system - not as an example of an efficient method.

Thanks for your replyWe use STM32F429, it has DMA. Where can we find stream buffers Demo for STM32, or other MCUs?

Just google “FreeRTOS stream buffer” and you will find pages on the website and I think also in the book.