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,181件の閲覧回数
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,124件の閲覧回数
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 件の賞賛
返信