# Nx uart2 ths2

**URL:** <https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270>\
**Category:** Jetson Xavier NX\
**Tags:** uart\
**Created:** [December 7, 2023, 1:56am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270 "2023-12-07T01:56:54Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlatae123](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rlatae123](https://forums.developer.nvidia.com/u/rlatae123)\
**Post date:** [December 7, 2023, 1:56am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270/1 "2023-12-07T01:56:54Z")

</div>

Hi

We are verifying PC and UART communication by disabling the debug port (/dev/ttyTCU0) and activating /dev/ttyTHS2 on the kernel dtb side.

Although stty can be used to communicate with the PC and Micro USB (CP2102) Uart, there is a symptom that the Uart signal is sometimes not transmitted from the NX side. When it was not transmitted, the stty command stopped in the terminal window, and when the waveform was observed with an oscilloscope in that state, no waveform was displayed.

We are using Jetpack 5.0.2. Is there anything that needs to be modified in terms of H/W or S/W for the above symptoms?

---

<div class="post-metadata">

**Author:** ![KevinFFF](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kevinfff/32/15508_2.png) [@KevinFFF](https://forums.developer.nvidia.com/u/KevinFFF)\
**Post date:** [December 7, 2023, 5:15am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270/3 "2023-12-07T05:15:59Z")

</div>

Hi rlatae123,

Are you using the devkit or custom board for Xavier NX?

> [@rlatae123](#):
>
> We are verifying PC and UART communication by disabling the debug port (/dev/ttyTCU0) and activating /dev/ttyTHS2 on the kernel dtb side.

Please share your current dmesg for further check.

> [@rlatae123](#):
>
> We are using Jetpack 5.0.2. Is there anything that needs to be modified in terms of H/W or S/W for the above symptoms?

Are you trying to use Micro-USB port from your board for normal UART instead of debug UART?

Could you also verify with the latest JP5.1.2(R35.4.1)?

---

<div class="post-metadata">

**Author:** ![rlatae123](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rlatae123](https://forums.developer.nvidia.com/u/rlatae123)\
**Post date:** [December 7, 2023, 8:00am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270/4 "2023-12-07T08:00:10Z")

</div>

We’re testing on the carrier board

In the dmesg log, nothing is visible when the uart transmission fails.

We disable combined-uart and enable THS2 to pass UART2(DEBUG) signal to MICRO USB using CP2102 chip.

I’ll test it with 5.1.2

---

<div class="post-metadata">

**Author:** ![rlatae123](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rlatae123](https://forums.developer.nvidia.com/u/rlatae123)\
**Post date:** [December 13, 2023, 9:19am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270/5 "2023-12-13T09:19:18Z")

</div>

HI @KevinFFF

We ran the same test on 35.4.1, but the results were the same…

---

<div class="post-metadata">

**Author:** ![KevinFFF](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kevinfff/32/15508_2.png) [@KevinFFF](https://forums.developer.nvidia.com/u/KevinFFF)\
**Post date:** [December 13, 2023, 9:53am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270/6 "2023-12-13T09:53:02Z")

</div>

What’s your use case for this UART?

Please share your device tree for further check.  
and also the result of the following command on your board.

```auto
# cat /proc/cmdline

```

> [@rlatae123](#):
>
> disabling the debug port (/dev/ttyTCU0) and activating /dev/ttyTHS2 on the kernel dtb side

I would also like to do how you do this on your custom board.

---

<div class="post-metadata">

**Author:** ![rlatae123](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rlatae123](https://forums.developer.nvidia.com/u/rlatae123)\
**Post date:** [December 18, 2023, 7:43am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270/7 "2023-12-18T07:43:03Z")

</div>

we want use ths2 to general uart

device tree :  
[UART.txt](https://forums.developer.nvidia.com/uploads/short-url/zfyuiDF2G6QNlo7SSh6iW2mFoJ5.txt) (393.6 KB)

```auto
canlab@canlab-desktop:~$ cat /proc/cmdline 
root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=tty0 fbcon=map:0 net.ifnames=0 video=efifb:off nospectre_bhb 

```

uart test command

```auto
canlab@canlab-desktop:~$ sudo chmod 777 /dev/ttyTHS2 
canlab@canlab-desktop:~$ stty -F /dev/ttyTHS2 115200
canlab@canlab-desktop:~$ echo -n -e "hi" > /dev/ttyTHS2

```

error case :

 ![image](https://global.discourse-cdn.com/nvidia/original/4X/f/7/7/f771bc6890dd7b8a62954f476e389085f2d7267a.png)

---

<div class="post-metadata">

**Author:** ![KevinFFF](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kevinfff/32/15508_2.png) [@KevinFFF](https://forums.developer.nvidia.com/u/KevinFFF)\
**Post date:** [December 19, 2023, 3:21am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270/8 "2023-12-19T03:21:27Z")

</div>

Could you use `nvidia,tegra20-uart` instead of `nvidia,tegra186-hsuart` for **uartc@c280000**?

```auto
	serial@c280000 {
- compatible = "nvidia,tegra186-hsuart";
+ compatible = "nvidia,tegra20-uart";

```

Please also share the dmesg for further check.

---

<div class="post-metadata">

**Author:** ![rlatae123](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rlatae123](https://forums.developer.nvidia.com/u/rlatae123)\
**Post date:** [December 19, 2023, 4:14am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270/9 "2023-12-19T04:14:57Z")

</div>

I tested nvidia, tegra20-uart, it changed THS2 to S2  
so I tested uart but same result

DMESG :  
[dmesg.log](https://forums.developer.nvidia.com/uploads/short-url/5O1NvIMfRQ5xCMyqpP3uKMgZawR.log) (68.9 KB)

---

<div class="post-metadata">

**Author:** ![KevinFFF](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kevinfff/32/15508_2.png) [@KevinFFF](https://forums.developer.nvidia.com/u/KevinFFF)\
**Post date:** [December 19, 2023, 6:48am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270/10 "2023-12-19T06:48:00Z")

</div>

Please run the following command for UART loopback test.

```auto
# stty -F /dev/ttyS2 115200 raw -echo
# cat /dev/ttyS2 &
# echo "test" > /dev/ttyS2

```

---

<div class="post-metadata">

**Author:** ![rlatae123](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rlatae123](https://forums.developer.nvidia.com/u/rlatae123)\
**Post date:** [December 19, 2023, 7:56am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270/11 "2023-12-19T07:56:26Z")

</div>

Here is my test

is it right? what screen should i see?

 ![image](https://global.discourse-cdn.com/nvidia/original/4X/5/7/1/5710822b183ff0a19dc162d6e34788c4858a712a.png)

---

<div class="post-metadata">

**Author:** ![KevinFFF](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kevinfff/32/15508_2.png) [@KevinFFF](https://forums.developer.nvidia.com/u/KevinFFF)\
**Post date:** [January 10, 2024, 8:19am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270/12 "2024-01-10T08:19:48Z")

</div>

It seems the issue coming from the combined UART not disabled comepletely.  
It might can not be disabled just through the device tree or configuration files.  
Sorry that we don’t verify this use case so that please just use other UART interface for your use case.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [January 30, 2024, 5:37am UTC](https://forums.developer.nvidia.com/t/nx-uart2-ths2/275270/14 "2024-01-30T05:37:11Z")

</div>

Closed on January 30, 2024, 5:37am UTC

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