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] [September 2009 Threads] Asynchronous serial data with 115200 bit/secPosted by Jonas Poulsen on September 4, 2009 Hi I know this is not the first time this topic has been discussed, so please forgive me.
I am working with FreeRTOS 5.2.0 on a NEC 78K0R-KG3 (12 kb RAM/ 256 FLASH / ~14 MHz) in preemptive mode with approx. 5 tasks. FreeRTOS is brilliant – easy to work with and stable!
My device interfaces another device using the built-in UART running 115200 bit/sec. Unfortunately I have no flow control available (neither sw./hw.) so I am really struggling to find a solution so I do not lose characters in my Rx interrupt. I believe the enter/exit critical section in for instance vTaskDelay (calls xTaskResumeAll() ) can take longer than the approx. 80 us I have between my incoming characters.
I have two onboard DMA controllers that can help me, but I have a total of 4 UARTS that I may, or may not, want to use in 115200 bit/sec.
Can anyone confirm that there is no easy way to solve this type of problem, other than using either DMA or implementing some kind of flow control.
Best regards,
Jonas, Denmark
RE: Asynchronous serial data with 115200 bit/secPosted by Peter on September 4, 2009 Hi Jonas, try to define the uart interrupt priority higher than all rtos related tasks. So the uart isr can interrupt the scheduler. Within the interrupt write the received character into a receive buffer (FIFO). Back in your task you can access the buffer. Could be that a solution?
RE: Asynchronous serial data with 115200 bit/secPosted by Jonas Poulsen on September 4, 2009 Hi Peter I have prioritized my UART RX interrupt at the highest possible level, but the problem is that interrupts are completely disabled when FreeRTOS execute some operations. No matter how the UART RX interrupt is prioritized it will not be executed....
/Jonas
RE: Asynchronous serial data with 115200 bit/secPosted by Jonas Poulsen on September 5, 2009 ** Update ** I have implemented a work-around using the two onboard DMA controllers, but I am still wondering if their is another solution.
BR, Jonas
RE: Asynchronous serial data with 115200 bit/Posted by Dave on September 5, 2009 I would not call that a work around but the reason why the DMA is provided in the first place and what is expected to be done.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|