The serial port cannot read the data in time at low baud rate.

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

The serial port cannot read the data in time at low baud rate.

1,183 次查看
864535720
Contributor II

Hello everyone, the development board I use is MCIMX7SABRE. The kernel version is Linux 4.9.88. 

When I use the serial port to receive data, when I set the baud rate to 4800, other devices always send data to me at a baud rate of 4800, but I can't read it in time using the read function in the application. data. I have to wait until the driver receives 4096 bytes before my application can read the data. Is this what is the reason?

标签 (1)
0 项奖励
回复
1 回复

1,126 次查看
igorpadykov
NXP Employee
NXP Employee

Hi 其东 刘 

one can check serial driver, in particular #define RX_BUF_SIZE    (PAGE_SIZE)

imx.c\serial\tty\drivers - linux-imx - i.MX Linux kernel 

Linux Blocking vs. non Blocking Serial Read - Stack Overflow 

15. Memory Mapping and DMA - Linux Device Drivers, 3rd Edition [Book] 

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

0 项奖励
回复