how to enhance uart baud rate for imx6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to enhance uart baud rate for imx6

Jump to solution
2,526 Views
mostion
Contributor II

Hi all,

   There is a issue about your BSP for IMX6, which kernel version is 3.10.7. We just want to use one of the uart port for high baud rate communication, but if we increase it above 115200, the processor seemed can't receive all bytes timely and the kernel returns "Rx FIFO overrun" random. I just want to know, how can I use 460800 baud rate normally without flow control? As I said, our platform designed it without any flow controls, just RX/TX line connect.

   BTW, we have another platform which use IMX535 core for same usefulness, it looks OK. Is it useful that change the configuration of uart clock? I believe that IMX6 could run higher baud rate than IMX535 under the same conditions, right?

   expect some suggestions.

Best regards,

Mostion

Labels (2)
Tags (1)
1 Solution
1,715 Views
mostion
Contributor II

   Well, I find a lot of message about this issue. It seemed that IMX6 can not support higher baud for UART without flow control. So, I change to another way to fix it.

   Base on our necessary, we need to transfer 10KB data per frame for communication. According our test result before, the processor can't all data when baud rate above of 115200. So, I modified the driver code to enable DMA no matter RTS/CTS enable or not. And then, increase the buffer of DMA receive which above of bytes per frame(3*PAGE_SIZE, and PAGE_SIZE default value is 4096). It avoid copying data from DMA buffer to kernel RX buffer When a frame of data is transmitted continuously.

   According these changes, our platform runs well.

Env:

CPU: IMX6solo

kernel: 3.10.7

UART: uart3 (460800/8/N/1) <no flow control>

the path of diver code: drivers/tty/serial/imx.c

View solution in original post

2 Replies
1,715 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi Mostion,

By default, the UART is configured as follows:
• Baud Rate: 115200
• Data bits: 8
• Parity: None
• Stop bits: 1
• Flow Control: None

115200 is default setting and can work well.
Have a great day,
Rita

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,716 Views
mostion
Contributor II

   Well, I find a lot of message about this issue. It seemed that IMX6 can not support higher baud for UART without flow control. So, I change to another way to fix it.

   Base on our necessary, we need to transfer 10KB data per frame for communication. According our test result before, the processor can't all data when baud rate above of 115200. So, I modified the driver code to enable DMA no matter RTS/CTS enable or not. And then, increase the buffer of DMA receive which above of bytes per frame(3*PAGE_SIZE, and PAGE_SIZE default value is 4096). It avoid copying data from DMA buffer to kernel RX buffer When a frame of data is transmitted continuously.

   According these changes, our platform runs well.

Env:

CPU: IMX6solo

kernel: 3.10.7

UART: uart3 (460800/8/N/1) <no flow control>

the path of diver code: drivers/tty/serial/imx.c