How to disable ttyTHS0 and ttyTCU0 debug function, and use both of them as normal uart serial port

Hi,
I have read some related topics:
how-can-we-disable-debug-console-on-jetson-xavier
nx-change-console-to-other-uart

and all the topics looks uncleared to me.
We are using JetPack 4.4.1 for NX,could you please show me the detailed steps to disable the ttyTCU0(Net name UART2) and ttyTHS0(Net name UART1) debug output,and configure them as normal serial?

Thanks!

hello suchb,

please check developer guide, Disable Console over UART.
thanks

Hi Jerry,

I don’t understand below in Disable Console over UART,
“For NVIDIA® Jetson AGX Xavier™ series: Edit the platform configuration file p2972-0000.conf.com to remove the specification console=ttyTCU0.”
I think NX belongs to Jetson AGX Xavier™ series, but the file p2972-0000.conf.com is not found under Linux_for_Tegra, is p2972-0000.conf.com==p2972-0000.conf.common? And there is “ROOTFSSIZE=28GiB;” in p2972-0000.conf.common,NX only has a 16GiB emmc.

By the way,NVIDIA Jetson Linux Developer Guide 32.5 Release is worked for JP4.4.1?

Hi,

after check developer guide, I found:
"p3668.conf.common
Flashing configuration for Jetson Xavier NX; for both P3668-0000 and ‑0001.“

so i modify p3668.conf.common as below:
CMDLINE_ADD=“console=tty0 fbcon=map:0 net.ifnames=0”;

reflash NX system.img with cmd:
sudo ./flash.sh -r jetson-xavier-nx-devkit-emmc mmcblk0p1

ttyTCU0 still output

debug.txt.txt (20.8 KB)

hello suchb,

you may remove the specification, console=<> in the platform configuration file.
please also check below for an example of each Xavier NX platforms.

$ ll jetson-xavier-nx-devkit*
jetson-xavier-nx-devkit.conf -> p3509-0000+p3668-0000-qspi-sd.conf
jetson-xavier-nx-devkit-emmc.conf -> p3509-0000+p3668-0001-qspi-emmc.conf
jetson-xavier-nx-devkit-qspi.conf -> p3509-0000+p3668-0000-qspi.conf

Hi,
this is my modifications,
1.p3668.conf.common

CMDLINE_ADD=“console=tty0 fbcon=map:0 net.ifnames=0”;

2.flash.sh

elif [ “${tegraid}” = “0x19” ]; then
# Xavier
# CMDLINE_ADD=“console=ttyTCU0,115200n8”;
echo “NULL CMDLINE_ADD for NX”
else

reflash system.img then reboot.
/dev/ttyTCU0 is still a debug uart.

what did I miss?

really need your help,thanks.

dmesg shows that kernel cmdline still have " console=ttyTCU0,115200"…

Kernel command line: console=ttyTCU0,115200 video=tegrafb no_console_suspend=1 earlycon=tegra_comb_uart,mmio32,0x0c168000 gpt usbcore.old_scheme_first=1 tegraid=19.1.2.0.0 maxcpus=6 boot.0

maybe I have to delete “console=ttyTCU0,115200” from /boot/extlinux/extlinux.conf?

Hi suchb,

Please also disable from device tree:

chosen {
8073                 bootargs = "console=ttyTCU0,115200";

And full flash again. Thanks!

OK,I’ll modify device tree.

and update my test result:

tegra194-mb1-bct-misc-l4t.cfg

defualt is:
enable_combined_uart = 1;
spe_uart_instance = 0x02;

change to:
enable_combined_uart = 0;
spe_uart_instance = 0x02;

reflash and reboot,ubuntu system can not start up.

Hi,

Please also disable from device tree

can I just delete bootargs = “console=ttyTCU0,115200”?

Hi, @carolyuu

I still can not make the ttyTCU0 as a normal uart,my steps as follows

1.delete console=ttyTCU0,115200n8 from file p3668.conf.common

2.delete CMDLINE_ADD=“console=ttyTCU0,115200n8” from file flash.sh

3.reflash.

4.delete bootargs =“console=ttyTCU0,115200”, or change to bootargs =“console=ttys2,115200” from file tegra194-p3668-common.dtsi, compile dts and reflash dtb.

Just want to know what is the exact meaning of “make the ttyTCU0 as a normal uart”? If console does not use this interface, will it become a normal uart?

ttyTCU0 is always output boot/kernel log,and provid login function on it. I don’t need them. what I want is use ttyTCU0 and ttyTHS0 serial communication with the computer,like ttyTHS1.

hello suchb,

may I know what’s the actual use-case here,
it’s default configuration as serial port for kernel messages; you may also setup connection for issue commands.

would you like something as ssh, that only sending commands?

Hi,

I want to use NX all tree uarts to do serial communication with pc or other serial devices,send and recv data.
/dev/ttyTHS1 is working good in my case.

/dev/ttyTHS0 is binded to the Ubuntu serial login.
/dev/ttyTCU0 is kernel messages debug port.
so, I want /dev/ttyTHS0 and /dev/ttyTCU0 worked as /dev/ttyTHS1.

1.For /dev/ttyTHS0, if I comment out below setting in /etc/systemd/nvgetty.sh Ubuntu login will not be provided on ttyTHS0:

#setsid /sbin/getty -L 115200 ttyTHS0

and it can be read/write data with serial devices,but if a serial devices connect to ttyTHS0 before NX power on, NX will enter SHELL MODE when power on.

2.For /dev/ttyTCU0, I haven’t disable the debug print yet.

hello suchb,

there’re 3 UARTs available Jetson Xavier NX,
UART0 to M2
UART1 to 40PIN
UART2 to debug

could you please refer to Jetson Xavier NX Product Design Guide and share the hardware connections you’d done.
thanks

Hi suchb
I have the same problem as yours now
How to disable debug UART?
How did you solve it?