Virtual UART serial console only working if the USB-C cable is connected before booting

Hi,

I’m working on a Jetson Orin NX with JetPack 5.1.2 and I’ve been having the following issue.

What happens is that I’m using the USB C port as a virtual UART but it only works if the cable is connected to the computer before the board boots.

If the cable is connected before the board boots, it works fine, the virtual UART serial console opens and is responsive to the inputs from the user. After the board has already booted, if I’m using the serial console and the cable is disconnected and reconnected again, it does not work anymore. If the board boots and then I connect the USB C to access the virtual UART serial console, it doesn’t work. The virtual UART serial console works if and only if the cable is connected before the board boots.

I did some research regarding this problem but I didn’t find any similar issues. What I found out is that there is an USB firmware that needs to be applied to the sources in order to fix a bug related to UART not receiving data.

That USB firmware version is for JetPack5.1.1, is there a new version of the USB firmware for JetPack5.1.2?
Is there a patch needed to solve this issue? Or what modifications to the kernel should I perform in order to fix the virtual UART serial console only working when the cable is connected before booting.

Best regards,

Hi frander.diaz,

Which interface are you using? (/dev/ttyXXX?)
Could you share the full dmesg for further check?

USB-C is used for flash the board rather than the serial console.
Are you connecting USB-C to your host and want to use it for serial console?

JP5.1.2 should use the new firmware for USB already.

I’m using /dev/ttyACM0.

This is the full dmesg log:
full dmesg.txt (66.6 KB)

Yes, I connected the USB-C to the host. I’m using the port for debugging purposes and the behavior that I mention also happens on the virtual ethernet interface, not only on the serial console.

What I want is to be able to have a working serial console or virtual ethernet whenever I connect the USB-C to the host and not only if the cable is connected before the board boots.

Just to clarify. It seems you are not using “UART serial console” but just the console based on the usb protocol. The topic sounds misleading.

(uart console means your console is based on UART, not usb).

The topic clearly says “Virtual UART” and the description says “using the USB C port as a virtual UART” but thank you for the clarification.

I’m looking forward KevinFFF’s answer.

Is this problem on the NV devkit or custom carrier board?

It’s on a custom carrier board.

Ok, may I know what is the situation in your previous dmesg?

It looks like a log when you have cable connected before boot. Could you confirm that?

Yes, I confirm that the cable was connected before boot.

Do you need a full dmesg of the case where the cable is disconnected after boot?

Please share me a dmesg where you don’t have any usb cable connected in the beginning.
After you boot up, connect the usb cable and dump log.

BTW, you told you are working on jp5.1.2, but your dmesg is still jp5.1.1. Which version do you want to use here?

I just double checked your log and notice there are some mislead in my previous comment.
Sorry in advance.

Are you talking about you have a usb device on the type C port like STM32 Virtual ComPort and Quad RS232-HS and you use that communicate with other device on UART protocol?

And you are opening /dev/ttyACM0 on your jetson but some kinds of host PC?

On dmesg there is no activity at all if I connect the usb cable after booting. I’ve tried multiple times but there are no new entries in dmesg -w.

I need to solve the issue on JP5.1.2. I checked if the issue also happens on JP5.1.1 (it does) and if it could be solved with the usb firmware but there was no success. I’m sorry for the dmesg on JP5.1.1 but I can confirm that the issue also happens on JP5.1.2

The STM32 and the other interfaces work as expected.

Just for us to be on the same page, I’m talking about he USB-C cable that it’s used for flashing, which is the same cable that enables the ACM0 on the host PC, which is also the same cable that sets up the l4tbr0 interface with 192.168.55.1 IP.

Hi,

Ok, so you are still talking about the default /dev/ttyACM0 which you could see on host side.

Then my previous comment is still correct. There is no UART thing involved in this topic.
This is basically just another usb device mode issue.

I don’t think the usb firmware is related to your issue. The usb firmware is to fix issue when jetson is playing as usb host. But in your issue, jetson plays as usb device.

The issue seems to be the type C port you designed has something wrong in data role change. So that hotplug does not trigger the usb device mode.

Please share us your board schematic for usb part and also what is your device tree right now.

You could also try to reproduce your issue on devkit (I don’t have it right now) and see if only custom board would hit this.

I can confirm that the issue doesn’t happen on the devkit, I’ve use it multiple times.

Unfortunately, the proprietary of the custom carrier board does not want me to share the schematics here.
We will consider this issue closed.

Thank you for your help.

1 Like

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