I am using Exar xr17v35x (DS-MPE-SER4M) on a PCIE for Serial Communication. I am using driver xr17v35x.
Steps i am following are
$ lspci -vd 13a8:*
01:00.0 Serial controller: Exar Corp. Device 0354 (rev 03) (prog-if 02 [16550])
Flags: fast devsel, IRQ 388
Memory at 50100000 (32-bit, non-prefetchable)
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Power Management version 3
Capabilities: [80] Express Endpoint, MSI 01
Capabilities: [100] Virtual Channel
Kernel driver in use: xrserial
ls /sys/bus/pci/drivers/serial/
0000:01:00.0 bind new_id remove_id uevent unbind
$ echo -n “0000:01:00.0” > /sys/bus/pci/drivers/serial/unbind
This is unbinding the generic serial driver from XR17V35x device
insmod xr17v35x.ko
Output of dmesg | grep tty
0000:01:00.0: ttyXR0 at MMIO 0x50100000 (irq = 388, base_baud = 7812500) is a XR17V35X
0000:01:00.0: ttyXR1 at MMIO 0x50100400 (irq = 388, base_baud = 7812500) is a XR17V35X
0000:01:00.0: ttyXR2 at MMIO 0x50100800 (irq = 388, base_baud = 7812500) is a XR17V35X
0000:01:00.0: ttyXR3 at MMIO 0x50100c00 (irq = 388, base_baud = 7812500) is a XR17V35X
So port ttyXR0, ttyXR1, ttyXR2, ttyXR3 is creating in /dev/
But when i am doing a loopback test i am not getting output . It is showing “Read Error”. It is not Communicating serially.
I am doing this on #2 configuration.
It looks like the kernel is recognizing the serial card but the ttyS* devices do not talk to the card for some reason.
Can someone help me find out if I am missing any step?
Do I need to load any kernel module?
Do I need to run anything before this can work?
Because lspci is showing, PCIe seems to be functioning to at least some degree. Because the device special files are created, it implies that the driver was also loaded and functioning.
Just to see what it might say about errors, post the verbose lspci (using three “-v” requires sudo):
sudo lspci -d 13a8: -vvv
In your loopback be sure TX and RX are bridged, and also bridge CTS and RTS. Then try your serial port test both with and without flow control.
So it appears the PCIe is working correctly at gen. 1 speeds and no errors. The driver is xrserial (which makes sense if it is using “xr” in the “/dev/” name).
What program are you using to determine loopback function? I tend to prefer gtkterm…but for whatever app you use, what settings are you using? Being in loopback guarantees both send and receive are matching in setup, but if for example the port is in a mode far enough different from what your app is using, then nothing will show (or garbage will show if you are getting close). This particular driver might differ in defaults from what I am used to.
Also, beware that often the user talking over the port needs to have either sudo permission or be in group “dialout”. You would need to use “ls -l” on the device special file to see for sure.
If you add package “gtkterm” (“sudo apt-get install gtkterm”…requires a GUI), and run as root (sudo), try this with TX and RX jumpered together for loopback (I am assuming ttyXR0, but you will need to adjust):
gtkterm -b 8 -t 1 -s 115200 -p /dev/ttyXR0
Do you see echo of what you type in? If so, then it works. If you see garbage, then it works, but one of the settings is “close”. If you see nothing, then it may just be a setting.
Typically you’d also want to try speeds 9600 and 38400:
Something in the driver seems to not be set up correctly, but I have no way to make a guess at what. Would someone at NVIDIA be able to comment on “error -28”?
Hello, I’m working with a similar Exar card and would like to hear if you resolved the driver or configuration issue that prevents the uarts from working.