I’m using a Jetson TX2 with Jetpack 3.1. The baud rate for /dev/ttyTHS1 appears to be stuck at 115200bps, as probed with an oscilloscope. I’ve tried using minicom, setserial, and my own program using boost::asio to set the baud rate with none of them working. They report that the baud rate has changed, but the scope still shows 115200bps. The same code works fine on the Jetson TX1.
Can you think of any reason my TX2 is unable to change the UART BAUD rate? Is anyone else having this problem or is anyone able to successfully change the baud rate with a test with another system or a scope (because setserial says the baud rate has changed when it hasn’t)?
Unfortunately I know nothing about the J120 (don’t have one). There were definitely some device tree changes needed, and if running R28.1 there were some device tree changes which put this into the boot loader instead of a separate file. Since the same code worked on a TX1 it seems you must have the right device, but I will ask this: Was the L4T version on the TX1 which worked R28.1? Which L4T versions are you testing with for both TX1 and TX2?
I’ve changed baud rate of ttyTHS1 successfully (we connect a xsens module @460800bps to this port), but encountered a weird problem: Can /dev/ttyTHS1 work at 460800bps? - Jetson TX2 - NVIDIA Developer Forums . The module should be in 8N2 mode, however, we have to use 8N1 otherwise the data received is not correct.
Could you post your serial configuration here(sudo stty -F /dev/ttyTHS1 -a)? If the cstopb is set and you can change the baud rate when it’s not set, it can explain both our problems.
Have you tried with minicom or other tools instead of your own program? Even though I encountered a weird problem of the ttyTHS1, I can change the baud rate at least.
I tried 460800 8N2 setting on TX2 with a PC, and it seemed good. However, with the xsens module mentioned in the above post, only 460800 8N1 on TX2 works. Maybe the PC didn’t send fast enough as the xsens module, or the xsens module’s baud rate is not accurate enough. As we have a workaround,it’s not urgent for us.
I am trying to set a baud rate higher than 115200 on /dev/ttyTHS2. To set different baud rate I use pyserial. When I try to set something higher than 115200 dmesg is:
tegra-ubuntu kernel: [ 5950.353453] serial-tegra 3110000.serial: configured rate out of supported range by -0.51 %