Hello! We are working on our own custom board and need to convert UART to 422. However, I found that the maximum baud rate I can achieve through stty
configuration is 4M, When I set it to 5M, it reports:stty: invalid argument ‘5000000’ Try ‘stty --help’ for more information.while the manual states that the Orin supports up to 12.5M. I would like to ask if it’s necessary to modify the device tree, and if so, how to do it, since the official development manual doesn’t clearly explain this part. Additionally, how can I enable the CTS and RTS for hardware flow control? Looking forward to your help!
Hi wpceswpces,
What’s the Jetpack version in use?
It seems you have to configure the parent clock for higher baud rate.
May I know what’s the required frequency in your use case?
Which UART interface are you using?
It depends on your serial application.
e.g. you can add crtscts
option for stty
to configure UART
You should also configure the pinmux before use.
Hello,KevinFFF
We are using JetPack 6.0 (r36.3), and we need a baud rate of at least 5 Mbps(stty -F /dev/ttyTHS1 5000000) to transmit data. we want use uarta( UART1 => UART1(PR02, PR03, PR04, PR05): uarta@3100000 (serial1) - /dev/ttyTHS1)
Hello,KevinFFF,
How can I modify the device tree? I tried adding assigned-clock-parents
and assigned-clock-rates
to the device tree, but it still didn’t take effect. It looks like the UART is still running at 68M. I noticed that the parent clock is already set to the recommended pllp_out0
.
root@ubuntu:~# cat /sys/kernel/debug/bpmp/debug/clk/uarta/parent
pllp_out0
root@ubuntu:~# cat /sys/kernel/debug/clk/clk_summary |grep uart
aon_uart_fst_mipi_cal 0 0 0 38400000 0 0 50000 Y
uartc 0 0 0 1828571 0 0 50000 Y
uarth 0 0 0 68000000 0 0 50000 Y
uartj 0 0 0 1837837 0 0 50000 Y
uarti 0 0 0 1837837 0 0 50000 Y
uartf 0 0 0 68000000 0 0 50000 Y
uarte 0 0 0 68000000 0 0 50000 Y
uartd 0 0 0 68000000 0 0 50000 Y
uartb 0 0 0 68000000 0 0 50000 Y
uarta 0 0 0 68000000 0 0 50000 Y
uart_fst_mipi_cal 0 0 0 102000000 0 0 50000 Y
root@ubuntu:~# echo 80000000 > /sys/kernel/debug/bpmp/debug/clk/uarta/rate
root@ubuntu:~# cat /sys/kernel/debug/bpmp/debug/clk/uarta/rate
68000000
root@ubuntu:~# echo 204000000 > /sys/kernel/debug/bpmp/debug/clk/uarta/rate
root@ubuntu:~# cat /sys/kernel/debug/bpmp/debug/clk/uarta/rate
68000000
root@ubuntu:~# cat /sys/kernel/debug/bpmp/debug/clk/uarta/min_rate
12450
root@ubuntu:~# cat /sys/kernel/debug/bpmp/debug/clk/uarta/max_rate
68000000
But the manual states that the maximum supported rate is 12.75M.
/sys/kernel/debug/bpmp/debug/clk/uarta/max_rate
is only up to 68M and cannot be modified? Could it be that the datasheet stating UART can reach 12.75M is incorrect? Can anyone explain this?
It appears that the baud rate limitation is imposed by the BPMP firmware, as most standard UART devices available on the market do not support baud rates exceeding 4 Mbps.
Can you try using uarti instead?
It seems supporting 204MHz currently.
# cat /sys/kernel/debug/bpmp/debug/clk/uarti/max_rate
204000000
Hello,KevinFFF
May I ask which hardware path UARTI corresponds to? Or is it a virtual serial port? The address seems to be 0x31D0000? How can i use it ?

Currently, it can be set to 204M, but I see that the datasheet states the maximum is 4M. Are you sure it can exceed 5M? Also, it seems like there is no flow control signal.
I have already configured the UARTI rate to 204M, but the 5M baud rate still cannot be set, not even 4M or 3M…
root@tegra-ubuntu:~# sudo stty -F /dev/ttyAMA3 12000000 crtscts raw -echo
stty: invalid argument ‘12000000’
Try 'stty --help' for more information.
root@tegra-ubuntu:~# sudo stty -F /dev/ttyAMA3 4000000 crtscts raw -echo
stty: /dev/ttyAMA3: unable to perform all requested operations
root@tegra-ubuntu:~# sudo stty -F /dev/ttyAMA3 5000000 crtscts raw -echo
stty: invalid argument ‘5000000’
Try 'stty --help' for more information.
root@tegra-ubuntu:~# sudo stty -F /dev/ttyAMA3 4000000 crtscts raw -echo
stty: /dev/ttyAMA3: unable to perform all requested operations
root@tegra-ubuntu:~# sudo stty -a -F /dev/ttyAMA3
speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
root@tegra-ubuntu:/boot/dtb# cat /sys/kernel/debug/bpmp/debug/clk/uarti/rate
204000000
root@tegra-ubuntu:~# dmesg |grep tty
[ 0.000000] Kernel command line: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 nospectre_bhb video=efifb:off console=tty0 bl_prof_dataptr=2031616@0xE2C610000 bl_prof_ro_ptr=65536@0xE2C600000
[ 0.000365] printk: console [tty0] enabled
[ 0.080848] 31d0000.serial: ttyAMA3 at MMIO 0x31d0000 (irq = 118, base_baud = 0) is a SBSA
[ 0.197056] printk: console [ttyTCU0] enabled
[ 4.108423] printk: console [tty0]: printing thread started
[ 4.109528] printk: console [ttyTCU0]: printing thread started
[ 6.591952] 3100000.serial: ttyTHS1 at MMIO 0x3100000 (irq = 112, base_baud = 0) is a TEGRA_UART
[ 6.592879] 3110000.serial: ttyTHS2 at MMIO 0x3110000 (irq = 208, base_baud = 0) is a TEGRA_UART
[ 30.230378] systemd[1]: Created slice Slice /system/getty.
[ 30.231605] systemd[1]: Created slice Slice /system/serial-getty.
Can you explain in detail how to use this serial port? How can I set it to a 5M baud rate for external data transmission?
my pinmux:
After writing the 500K rate into the dtb (current-speed), it can be seen that it takes effect. However, when i writing 5M speed ,it shows speed = 0.
[ 0.000000] Kernel command line: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 nospectre_bhb video=efifb:off console=tty0 bl_prof_dataptr=2031616@0xE2C610000 bl_prof_ro_ptr=65536@0xE2C600000
[ 0.000372] printk: console [tty0] enabled
[ 0.082137] 31d0000.serial: ttyAMA3 at MMIO 0x31d0000 (irq = 118, base_baud = 0) is a SBSA
[ 0.197154] printk: console [ttyTCU0] enabled
[ 4.066825] printk: console [tty0]: printing thread started
[ 4.067472] printk: console [ttyTCU0]: printing thread started
[ 6.547893] 3100000.serial: ttyTHS1 at MMIO 0x3100000 (irq = 112, base_baud = 0) is a TEGRA_UART
[ 6.548339] 3110000.serial: ttyTHS2 at MMIO 0x3110000 (irq = 208, base_baud = 0) is a TEGRA_UART
[ 30.518872] systemd[1]: Created slice Slice /system/getty.
[ 30.520192] systemd[1]: Created slice Slice /system/serial-getty.
root@tegra-ubuntu:~# stty -a -F /dev/ttyAMA3
speed 500000 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
root@tegra-ubuntu:~# stty -a -F /dev/ttyAMA3
speed 0 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
The crtscts setting was added but did not take effect.
root@tegra-ubuntu:~# stty -a -F /dev/ttyAMA3 crtscts
stty: when specifying an output style, modes may not be set
root@tegra-ubuntu:~# stty -a -F /dev/ttyAMA3
speed 500000 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
bpmp and clk_summary shows different clk…
It should be the second one (C58, C56, G58, A57), which maps to uarti: serial@31d0000
in device tree.
Have you connected your serial device on these pins?
Please also try to update the driver for this node.
- compatible = "arm,sbsa-uart";
+ compatible = "nvidia,tegra194-hsuart";
Hello,KevinFFF,
After the device has finished booting, i use stty -a
to check /dev/ttyTHS3
causes the system to freeze. The serial log is as follows:
log.txt (189.0 KB)
dmesg.txt (67.0 KB)
tegra234-p3737-0000+p3701-0008-nv.dtb.txt (238.9 KB)
bpmp and clk_summary still shows different clk…
Looking forward to your reply.
It seems expected since stty command does not support for this baud rate.
It supports only standard baud rate like 9600, 19200, 38400, 115200..etc.
Please run the following command on your board and share extracted_proc.dts for further check.
$ sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree
extracted_proc.dts.txt (312.0 KB)
Hello,KevinFFF
Glad to receive your message. The attached file is the device tree source file exported from the device.
I’ve checked this with internal.
For uart-i(serial@31d0000), please just use default SBSA-UART driver. (i.e. keep using default compatible = "arm,sbsa-uart";
).
If you want to use 5M baud rate, please configure 80MHz(=5M*16) for its clock in sysfs as following:
# echo 80000000 > /sys/kernel/debug/bpmp/debug/clk/uarti/rate
Please note that there’s no HW flow control available for this UART interface so that we cannot guarantee that there might be data loss.
Hello,KevinFFF,
does uarti support 5M baudrate,i find the datasheet just show the max is 4M as follows, or i should use UARTJ?
UART-J is pin-muxed with UART-C, which is used for debug purpose(Tegra Combimed UART).
We don’t suggest using it for other use case since it outputs logs from several firmwares.
To use high baud rate, we suggest enable HW flow control to prevent data loss.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.