AGX Orin UART2 data lost when loopback test

Hi Nvidia,

We used UART2_RX(C56) / UART2_TX(C58) in our custmor carrier board.

AGX Orin 32GB, JetPack 6.2

The usrt data will lost in loopback test. The TX/RX pin are level-shifted from 1.8 V to 3V.

~$ sudo stty -F /dev/ttyTHS3 115200 -crtscts raw -echo
~$ sudo cat /dev/ttyTHS3 &
[1] 10784
~$ sudo sh -c "echo 'UART2-LOOP-TEST123456789AB' > /dev/ttyTHS3"
~$ AB
~$ sudo sh -c "echo 'UART2-LOOP-TEST123456789ABCDEF' > /dev/ttyTHS3"
~$ ABCDEF
~$ sudo sh -c "echo 'TEST123456789' > /dev/ttyTHS3"
~$ 56789

This is my dts and pinmux

                        uart5_tx_py5 {
                                nvidia,pins = "uart5_tx_py5";
                                nvidia,function = "uarte";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                                nvidia,lpdr = <TEGRA_PIN_DISABLE>;
                        };

                        uart5_rx_py6 {
                                nvidia,pins = "uart5_rx_py6";
                                nvidia,function = "uarte";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                nvidia,lpdr = <TEGRA_PIN_DISABLE>;
                        };

uart2.dts.txt (319.4 KB)

Hi Wilson_Lin,

Have you confirmed that you’ve shorted UART2_TX and UART2_RX correctly?

Please share the full dmesg for further check.

You can also check if the following commands can help for your case.

$ sudo systemctl stop nvgetty.service
$ sudo systemctl disable nvgetty.service
$ sudo systemctl status nvgetty.service

Hi Kevin,

Yes I shorted UART2_TX and UART2_RX. If not, I can’t get any respones.

~$ sudo systemctl status nvgetty.service
○ nvgetty.service - UART on ttyTHS0
     Loaded: loaded (/etc/systemd/system/nvgetty.service; disabled; vendor preset: enabled)
     Active: inactive (dead)

I disable the nvgetty but still lost the data.

This is my dmesg.

uart2_dmesg.log (65.3 KB)

Have any update?

[    1.862000] 3140000.serial: ttyTHS3 at MMIO 0x3140000 (irq = 113, base_baud = 0) is a TEGRA_UART

This is the UART2 you are using.

Could you try removing the following line in the device tree to see if that helps>

		serial@3140000 {
			compatible = "nvidia,tegra194-hsuart";
			reg = <0x00 0x3140000 0x00 0x10000>;
			interrupts = <0x00 0x74 0x04>;
			clocks = <0x03 0x9f>;
			resets = <0x03 0x68>;
-			dmas = <0xee 0x14 0xee 0x14>;
-			dma-names = "rx\0tx";
			status = "okay";
			reset-names = "serial";
			phandle = <0x22f>;
		};

Hi Kevin,

Thank a lot.

The echo loopback test is OK.

Does turning off DMA reduce UART performance?

I think using UART in PIO mode would be fine for your use case as you are using 115200 as baud rate.

Thanks a lot again.

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