Hello, when I was using the agx orin module jetpack 5.1.1 version, I found a problem with the USB to serial port.
The USB-to-serial port module I use is the chip of ch340, and the device connected to the serial port is an IMU that automatically sends serial port data when it is powered on.
When I open this serial port with cutecom, sometimes I can receive data normally, and sometimes I can’t receive data normally. I want to know why.
Could this be a serial port problem, or a USB problem?
This is a serial problem.
The default state of an serial line is high. A byte always start with a 0 as the start bit, then the data bits from right to left, then an optional parity bit, and last a 1 as a stop bit. After the stop bit the receiver waits for the next 0 bit. When the transmitter sends bytes without pauses in betweeen the receiver may use a 0 data bit as a start bit, and this will obviously get incorrect data.
In order to fix this problem the transmitter needs to insert pauses of at least 10 ‘1’ bits after each telegram/data packet/protocol unit/… in order for the receiver to find the next real start bit. Then the first line or data packet might be corrupt, but the receiver will synchronize eventually.
Devices that implement USB natively without any internal USB-serial bridge obviously don’t have this problem.
Solutions:
Fix the transmitter
use different product
try
{
open serial port
power off serial device
discard all received data
power on serial device
}