imxqxp uart

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

imxqxp uart

690 Views
gravity_one
Contributor III

Hi NXP,

We build our board on i.MX8QXP as SoC.
We use /dev/ttyLP0 as console and connect /dev/ttyLP2 to a GNSS module which write GNSS data steadily to i.MX8QXP.
We run 'cat /dev/ttyLP2' to read GNSS data.
However, when we plugin/plugout a USB disk several times with kernel message output enabled, 'cat /dev/ttyLP2' will stop to output GNSS data.
If the baudrate of /dev/ttyLP2 is 460800 and GNSS module write data heavily, the above phenomenon could reproduce after plugin/plugout the USB disk 3~5 times.
If the baudrate of /dev/ttyLP2 is 38400 and GNSS module write data normally, the above phenomenon could reproduce after plugin/plugout the USB disk about 30 times.
After we disable kernel printk(by 'echo 1 4 1 7 > /proc/sys/kernel/printk'), plugin/plugout USB disk won't stop ‘cat /dev/ttyLP2’ to output data.
It seems that when kernel printk on /dev/ttyLP0, RX of /dev/ttyLP2 will be blocked.

After 'cat /dev/ttyLP2' stops to output GNSS data, we rerun 'cat /dev/ttyLP2' immediately, we could still read GNSS data from cat. So the GNSS module dumps GNSS data steadily, the problem is not caused by GNSS module.
cat is a linux program, we believe the program cat is stable. So the problem is not caused by application software.
Now we think the problem is caused by uart driver or hardware.
But uart hardware is a low speed IO, we hardly believe the problem is interfered by other high speed hardware component.
So we guess the problem is caused by NXP's uart driver software.

Did other NXP customers encounter the similar problem?
Could you help us to solve this problem?


Following is some information related:
------------------------------------------------
root@ctx0800-c0:~# uname -a
Linux ctx0800-c0 4.14.98+g4c1b7ab #1 SMP PREEMPT Sun Feb 21 17:37:03 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux


Kernel command line: console=ttyLP0,115200 no_console_suspend earlycon=lpuart32,0x5a060000,115200 root=/dev/sda2 rootwait rw mtdparts=5d120000.flexspi:3m(uboot),1m(uboot_cfg),-(misc)


our linux printk configuration (kernel output enabled)
root@ctx0800-c0:~# cat /proc/sys/kernel/printk
7 4 1 7


kernel output when we plugin/plugout USB disk
root@ctx0800-c0:~# [ 109.616542] usb 3-1.2: new high-speed USB device number 4 using ci_hdrc
[ 109.837827] usb-storage 3-1.2:1.0: USB Mass Storage device detected
[ 109.844750] scsi host1: usb-storage 3-1.2:1.0
[ 110.882742] scsi 1:0:0:0: Direct-Access Kingston DataTraveler 2.0 0000 PQ: 0 ANSI: 4
[ 110.893161] sd 1:0:0:0: [sdb] 30273600 512-byte logical blocks: (15.5 GB/14.4 GiB)
[ 110.901486] sd 1:0:0:0: [sdb] Write Protect is off
[ 110.906827] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 110.920458] sdb: sdb1
[ 110.925948] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[ 111.331840] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 128.850925] usb 3-1.2: USB disconnect, device number 4
[ 128.914941] FAT-fs (sdb1): FAT read failed (blocknr 3236)

0 Kudos
1 Reply

659 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Does it work well now? The Baud Rate recommend to use 115200

0 Kudos