Jetson orin nano eMMC : UART /dev/ttyTHS1 not working

Hello,

I can’t use the UART /dev/ttyTHS1 correctly. I tried with a GPS or a Bluetooth over UART. Everything is working as expected when I don’t use a balena based Host but doesn’t work with Balena.

I talk about using pin 8 and 10

I know there is this link Jetson Nano UART (/dev/ttyTHS1) not working but it doesn’t provide any solution.

I use OS version 6.4.0

For example, with Bluetooth, I have the following issue in dmesg : [ 184.829759] Bluetooth: hci0: command 0x1009 tx timeout

when using Balena, here is the output of dmesg | grep serial

[    0.184621] usbcore: registered new interface driver usbserial_generic
[    0.184641] usbserial: USB Serial support registered for generic
[    3.597651] 3100000.serial: ttyTHS1 at MMIO 0x3100000 (irq = 112, base_baud = 0) is a TEGRA_UART
[    3.598640] 3140000.serial: ttyTHS2 at MMIO 0x3140000 (irq = 113, base_baud = 0) is a TEGRA_UART

And here is the output when using Jetpack (so when it works) :

[    3.376154] serial-tegra 3100000.serial: RX in PIO mode
[    3.376158] serial-tegra 3100000.serial: TX in PIO mode
[    3.376220] 3100000.serial: ttyTHS1 at MMIO 0x3100000 (irq = 112, base_baud = 0) is a TEGRA_UART
[    3.376696] serial-tegra 3140000.serial: RX in PIO mode
[    3.376701] serial-tegra 3140000.serial: TX in PIO mode
[    3.376739] 3140000.serial: ttyTHS2 at MMIO 0x3140000 (irq = 113, base_baud = 0) is a TEGRA_UART

Any idea on this one ?

I found something really interesting !

  • I have connected RX to TX (loopback) so pin 8 to 10.
  • I open one terminal : echo "placeholder" > /dev/ttyTHS1
  • I open another terminal : cat -v /dev/ttyTHS1

What I receive is : ^@^@^@^@^@^@^@^@der so seems like first characters are truncated. Here is what I see in dmesg :

[  715.007379] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x402, iova=0x80240000, fsynr=0x60011, cbfrsynra=0xc04, cb=0
[  715.009643] tegra-mc 2c00000.memory-controller: unknown: secure write @0x00000003ffffff00: VPR violation ((null))
[  715.009658] tegra-mc 2c00000.memory-controller: unknown: secure write @0x00000003ffffff00: Route Sanity error ((null))
[  716.806316] arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x402, iova=0x802fc000, fsynr=0x1d0011, cbfrsynra=0x404, cb=0
[  716.806403] tegra-mc 2c00000.memory-controller: unknown: secure write @0x00000003ffffff00: VPR violation ((null))
[  716.806410] tegra-mc 2c00000.memory-controller: unknown: secure write @0x00000003ffffff00: Route Sanity error ((null))

If I send a smaller message like echo "test" > /dev/ttyTHS1, I don’t run into any issue (cat returns “test” aswell and I don’t see anything in dmesg.

If anyone understands why this issue occurs…

Hello @avanmalleghem could you please confirm what board are you using? Is this the devkit?

Thanks!

In the meantime, a colleague pointed to me that you have a similar issue than here @avanmalleghem

Feel free to share more details of your device tree so we can help you more!

Yes it is on the devkit !

I tried to rebuild the DTB by removing the lines related to dma and it solves the issue !
Thanks for the link.

1 Like

Awesome @avanmalleghem thanks for sharing!