how to enhance uart baud rate for imx6

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

how to enhance uart baud rate for imx6

跳至解决方案
3,713 次查看
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

标签 (2)
标记 (1)
1 解答
2,902 次查看
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

在原帖中查看解决方案

2 回复数
2,902 次查看
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 项奖励
回复
2,903 次查看
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