9600 is not HIGH baudrate.
We measured the real baud rate in oscilloscope, our device is 9671, the error is 0.7%, it cause lost byte or receive error data. But if we short the rx/tx pins of Nano, it works fine. The real baud rate is 9615 for now.
The problem confirmed.
When we set the baud rate to 9670, all errors gone.
But we can’t use it as solution, because the frequency error is random value.
So how to resolve this problem?
Is there some docuemnt list the uart baud rate tolerance?
The driver for “nvidia,tegra114-hsuart” is serial-tegra.c.
There is “baud_tolerance” In the driver and it’s value input from dts “nvidia,adjust-baud-rates” entry.
Is there a way allow us set the tolerance in the code?
it’s configure in the device tree property settings,
for example, nvidia,adjust-baud-rates = <115200 115200 100>; the 3rd column means it has 1% deviation.
We try to set the dts “nvidia,adjust-baud-rates” to “9600, 115200, 200” ,But the errors still there.
Would you like to reproduce this issue? Use two nano module for send and receive, then set different baud rate for them.
static long tegra_get_tolerance_rate(struct tegra_uart_port *tup,
unsigned int baud, long rate)
{
int i;
for (i = 0; i < tup->n_adjustable_baud_rates; ++i) {
if (baud >= tup->baud_tolerance[i].lower_range_baud &&
baud <= tup->baud_tolerance[i].upper_range_baud)
return (rate + (rate *
tup->baud_tolerance[i].tolerance) / 10000);
}
return rate;
}
The tolerance just simple as a COEFFICIENT. That not “tolerance” meaning.
We found some words in Linux official docuemnt:
Baud Rate tolerance:
Standard UART devices are expected to have tolerance for baud rate error by
-4 to +4 %. All Tegra devices till Tegra210 had this support. However,
Tegra186 chip has a known hardware issue. UART Rx baud rate tolerance level
is 0% to +4% in 1-stop config. Otherwise, the received data will have
corruption/invalid framing errors. Parker errata suggests adjusting baud
rate to be higher than the deviations observed in Tx.
Would you please provide the baud rate error tolerance?
It’s very important for our project, Thank you!
Hi,
This looks expected. The clock source is not able to generate arbitrary rate and certain values may not work properly. If you use default rate 115200, it should be stable.
Hi,
We have checked it with our team and confirmed there is constraint in Jetson TX1/Nano. The receiver’s baudrate should be higher in the range of 0-X% of the sender’s baudrate.
If Sender (TX) is sending data at 9700 baudrate then RX baudrate should range from 9700 to (9700 * (1 + (X / 100))). This is with the one stop bit configuration.
Hi,
Does the external device have tolerance range? Maybe try to set Jetson Nano to 9600* 1.01 or 9600* 1.02. and see if it is within tolerance range of the external device.
For regular device, the baud rate tolerance range is +/-2%。
So the max error between sender and receiver is 4%, which is the max accecpted error in uart comm for theory.