Debug Serial Port Connection Problem

Hi My name is Attila.

I have a ADCU - Autonomous Driving Control Unit board thats have a AGX Xavier board .

I wire up FT232RL board(Laptop side) to RS232-3(ttyTHS2 used for Debug).(115200 8N1)

But after click enter on the Putty, i couldn’t get readeble output from RS232 Interface 3.

I think the problem might be related to linux side serial configuration and then

I decided to dive into the problem. I connected RS2332-1(ttyTHS0) wire with FT232RL converter and try some send-receive operation.

On the ADCU(Xavier) side , run the “cu -l /dev/ttyTHS0 -s 115200”
My laptop side , atttached FT232RL launched Putty with same baud rate and configuration

When i send “1” to from Laptop (Putty) , ADCU side recevied “g”.(vice versa)
When i send “g” to from Laptop (Putty) , ADCU side recevied “C”.(vice versa)
When i send “2” to from Laptop (Putty) , ADCU side recevied “3”.(vice versa)

what causes this problem?

(I attached sorted out dmesg output that related to Serial side)

(I connected RS232-3(ttyTHS2) and RS232-1(ttyTHS0) wires and opened serial communication line(cu -l /dev/ttyTHS0 -s 115200) , i saw login prompt without any problem)

(After ls /dev/tty*
… /dev/ttyTCU0 /dev/THS0 /dev/THS1 /dev/THS4 /dev/THS6)

dmesg-out.txt (1.9 KB)

Note: RS232 implies a particular physical interface using a 9-pin D-Sub connector. When connected to a USB UART at 3.3V levels (which is what the AGX uses) there would be data errors. Can I assume this is really all UART and not a 9-pin D-Sub? Are all sides of this using 3.3V (or there is an adapter between RS232 and UART to 3.3V)?

The default port setting is indeed 115200 8N1, and I think that is what you’ve selected, so you might try:
cu --parity=none -l /dev/ttyTHS0 -s 115200

I prefer gtkterm (“sudo apt-get install gtkterm”) which would be something like this:
gtkterm -b 8 -t 1 -s 115200 -p /dev/ttyTHS0
(“cu” should work fine, but I know gtkterm and if those settings fail the same way then I know it isn’t terminal settings causing this unless the data types themselves differ at the two ends of the terminal)

And actually PuTTY can also be installed and used on Linux, so that too is an option.

Can you verify if “g” really exchanges as “1” or if it exchanges as “C”? I ask because you use lower case “g” twice and say vice-versa with two different values, once as “1” and once as “C”.

Here are some ASCII values of the characters in test:

Dec Hex Char Binary
49  31  1    0b0110001
103 67  g    0b1100111

50  32  2    0b0110010

103 67  g    0b1100111
67  43  C    0b1000011

In the binary it is possible that a bit shift and transposing a single “1” would result in those shifts. You might want to clarify about “g”, or provide the way it transposes if sending this sequence:


(one would be able to see a bit shift pattern for all 8 bits if this consistently changes in a particular shift/transpose pattern)

When changes are random, then it is more likely voltages are off or lines are noisy which tends to corrupt. If instead there is a fixed 1-bit shift pattern, then it is likely the number of bits or stop bits are off by 1.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.