after switching from BSP 2.5 to 2.6.1 the UARTs on the vf50 module don’t work as expected anymore.
One problem has something in common with issues I had before:
- vf50 UART issue (Linux) - Toradex Community and
- Linux VF50 UART stops after receiving invalid data - Toradex Community
After receiving invalid data, the following received bytes are delayed and prepended to the next received message The last bytes of the new mesage are prepended to the following message and so on.
This leads to unusable communication with timeouts and CRC errors.
It’s easy to reproduce it on the command line:
On the device:
root@colibri-vf:~# stty -F /dev/ttyLP2 19200 root@colibri-vf:~# cat /dev/ttyLP2
On the PC:
stty -F /dev/ttyUSB1 19200 echo "111" > /dev/ttyUSB1 # Result on the device: 111 stty -F /dev/ttyUSB1 9600 echo "222" > /dev/ttyUSB1 # Result on the device: nothing stty -F /dev/ttyUSB1 19200 echo "333" > /dev/ttyUSB1 # Result on the device: 111 (wtf?) or some invalid characters echo "444" > /dev/ttyUSB1 # Result on the device: empty line echo "555" > /dev/ttyUSB1 # Result on the device: 333 echo "666" > /dev/ttyUSB1 # Result on the device: 444
As a workaround I switched back to kernel 4.1.15 (used in BSP 2.5), but I would like to stay in sync with the toradex BSP,
The other problem with the UART is, that I’m not able to use a TTY line discipline driver (based on the common slcan but for LIN protocol) anymore. There are problems with receiving replies from another device after sending a request (I get a timeout) It works fine on all devices and kernels I tried so far, but with BSP 2.6.1 on vf50 I get receive timeouts.
I’m not sure if it has something to do with the issue above and I think, more research is needed, but maybe you have an idea on what happened.
Thank you for your help,