Hydrix Hydrix

iMX25 UART: TX  bit errors on linux-2.6.3

Discussion created by Hydrix Hydrix on Dec 8, 2011
Latest reply on Dec 9, 2011 by Mehmet Ali Ipin

Hi all,

I'm sorry that my question is rather vague. I'm still trying to get a handle on the problem that I'm facing.

I've noticed bit errors on the TX line on UARTs 2 and 3 on a iMX25 based board. The UARTs are connected to an RS422 bus (Full duplex RS485).

The problem manifests on a very specific scenario outlined below:

 

I'm using a PC with a USB to RS485/422 converter, and the i.MX25 based linux box which I'll call DEVICE.

 

Test:

The PC transmits and receives a ~32K file (send_file.bin and recv_file.bin):

The DEVICE loops back the received file and makes a local copy:

stty -F /dev/ttymxc2 raw -tostop speed 9600 -echo -parenb
cat /dev/ttymxc2 | tee file > /dev/ttymxc2



send_file.bin in the PC and file in linux are identical which indicates that transmission from the PC are OK. But the data in send_file.bin and recv_file.bin have bit errors: 1-2 bits on some of the bytes are randomly flipped (1->0 and 0->1).

 

Test 2:

The PC only receives the file with linux transmitting it.

This time there were no errors in the file. In other words, it looks like the problem occurs when the DEVICE is receiving and transmitting at the same time.

 

Other info:

I've verified the USB to RS4xx converter by looping back the wires.

Electrically, the signals on the RS485 bus look clean (no noise or slew problems).

The issues occurs at both 115200 and 9600bps.

 

Has anyone else encountered anything like this? Any suggestions on how to tackle this beast?

 

Thanks,

DJ

Outcomes