Error Enabling UART0 as Serial Port on Nvidia Jetson Orin Nano

Issue Overview

Users of the Nvidia Jetson Orin Nano development board with a custom carrier board are experiencing difficulties enabling UART0 (UARTB – M2 key) as a serial port. The issue occurs during the setup process when attempting to configure the device tree and generate pinmux tables. Specifically, users encounter an error when running a Python script to generate configuration files. This problem affects the ability to use UART0 for communication with other peripherals.

Possible Causes

  1. Incorrect Device Tree Configuration: The status of the serial@3110000 node in the device tree may be set to "disabled" instead of "okay".

  2. Mismatched Tegra Version: Users may be using pinmux files for the wrong Tegra version (T19x for Xavier series instead of T23x for Orin series).

  3. Insufficient Permissions: Changes to system files may not be applied due to lack of sudo privileges.

  4. Outdated Software: The issue could be related to outdated Jetpack or L4T versions.

  5. Incorrect Pinmux Configuration: The pinmux configuration file might not be properly set in the board config file.

Troubleshooting Steps, Solutions & Fixes

  1. Enable UART0 in Device Tree:

    • Locate the device tree file for your board (e.g., tegra234-p3767-0004-p3768-0000-a0.dtb) in the Linux_for_Tegra/kernel/dtb/ directory.
    • Decompile the DTB file to a readable format.
    • Find the serial@3110000 node and change its status from "disabled" to "okay".
    • Recompile the modified device tree back to DTB format.
    • Use sudo privileges when making these changes to ensure they are applied.

    Example of the required change:

    serial@3110000 {
        compatible = "nvidia,tegra194-hsuart";
        // ... other properties ...
    -   status = "disabled";
    +   status = "okay";
    };
    
  2. Verify Tegra Version:

    • Ensure you are using the correct pinmux files for the Orin series (T23x).
    • Check the pinmux folder path: it should be for T23x, not T19x.
  3. Update Software:

    • Ensure you are running the latest Jetpack and L4T versions compatible with your hardware.
    • Use the NVIDIA SDK Manager to update your software if necessary.
  4. Configure Pinmux:

    • Locate the board config file.
    • Verify that the PINMUX_CONFIG variable is set to the correct .dtsi file for your board.
  5. Flash the Device:

    • After making the necessary changes, flash the device with the updated configuration.
    • Use the following command to flash the device:
      sudo ./flash.sh jetson-orin-nano-devkit mmcblk0p1
      
  6. Verify UART0 Functionality:

    • After flashing, check if UART0 is now available as a serial port.
    • You can use the following command to list available serial ports:
      ls /dev/ttyTHS*
      
    • UART0 should typically appear as /dev/ttyTHS0.
  7. Test Serial Communication:

    • Use a terminal program like minicom or screen to test the serial communication.
    • Example command:
      sudo minicom -D /dev/ttyTHS0
      
  8. Check Kernel Messages:

    • Review the kernel messages for any UART-related information:
      dmesg | grep ttyTHS
      

If the issue persists after following these steps, consider reaching out to NVIDIA Developer Forums with detailed logs and your current configuration for further assistance.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *