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

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

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

1,180 Views
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?

Labels (1)
0 Kudos
Reply
1 Reply

1,123 Views
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 Kudos
Reply