IMX6ULL UART lost bytes

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

IMX6ULL UART lost bytes

跳至解决方案
683 次查看
fab_obe
Contributor I

We are using a custom IMX6ULL board and on the UART serial 2 (UART3, ttymxc2) we have a wireless-chip connected. We push (not very much) ipv6 network traffic over the UART, which mostly seems to work. At a baudrate of 115200 occasionally single bytes are missing (rx on the imx). If it happens, the missing byte is always on the same position of the message - the 33rd byte. We connected a Windows serial adapter onto the UART where we can see the byte which is missing on the Linux side. The missing byte is independent from the sent data, because sometimes the data is complete.

We are using Ubuntu 22.04 and we've already tried custom built Linux Kernels 5.10, 5.15, 6.1 and 6.4. With 5.15 the problem seems to be not that frequent as with 5.10. With 6.1 and 6.4 the problem gets worse, because not only a single byte is missing but multiple in a row.

Changing the baudrate to 57600 seems to eliminate the problem. Also sending to linux with 2 stop-bits (while linux itself has only one configured) seems to work. But both solutions don't make us really happy, because we think 115200 isn't that much so it should work. Are there maybe some dts-configurations like clocks which could solve the problem? Could it has something to do with the rx buffer size? Maybe someone has some ideas - thanks!

标签 (1)
0 项奖励
回复
1 解答
619 次查看
fab_obe
Contributor I

Thanks for the reply. In the meantime we were able to confirm a lot of overrun errors in /proc/tty/driver/IMX-uart.

We've tried the official linux-yocto kernels (5.10, 5.15, 6.1, 6.4). Because of your reply we've also tried the Iinux-imx 5.15 and 6.1 kernels as suggested by you. Both are significant better than the linux-yocto ones. The 6.1 still has some issues with overrun errors (but by far less) and the 5.15 seems almost perfect, so we settled with the linux-imx 5.15.

Thanks!

在原帖中查看解决方案

0 项奖励
回复
2 回复数
643 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello @fab_obe 

1.Did you use linux-imx from here https://github.com/nxp-imx/linux-imx ?

2.Is it possible to use other uart for test?

0 项奖励
回复
620 次查看
fab_obe
Contributor I

Thanks for the reply. In the meantime we were able to confirm a lot of overrun errors in /proc/tty/driver/IMX-uart.

We've tried the official linux-yocto kernels (5.10, 5.15, 6.1, 6.4). Because of your reply we've also tried the Iinux-imx 5.15 and 6.1 kernels as suggested by you. Both are significant better than the linux-yocto ones. The 6.1 still has some issues with overrun errors (but by far less) and the 5.15 seems almost perfect, so we settled with the linux-imx 5.15.

Thanks!

0 项奖励
回复