How to set and test GPIO

Hello,

I’m trying to control the dc 24v lamp using GPIO.
In jetpack 6.2 version, I noticed there was an error if I just tried to use GPIO.

As a result of the search, there was a way to flash again, a way to clone the git repository, a way to fix it, and a way to do Pinmux Changes.

I don’t know which of these methods to use.

When I haven’t done any setup for GPIO yet, is there a guide or doc on how to be stable without doing flash again as much as possible?

Platform

  • Machine: aarch64
  • System: Linux
  • Distribution: Ubuntu 22.04
  • Release: 5.15.148-tegra
  • Python: 3.10.12

Libraries

  • CUDA: 12.6.68
  • cuDNN: 1.0

Hardware

  • Model: NVIDIA Jetson Orin Nano Engineering Reference Developer Kit Super

Jetpack

  • Source: nvidia-jetpack (6.2.1)
  • nvidia-l4t-core 36.4.7-20250918154033

Hi dongju25,

Are you using the devkit or custom board for Orin Nano?
Could you share the result of cat /etc/nv_boot_control.conf on your board?

Do you want to use the GPIO as output?
If so, which pin would you like to use?

Maybe you can refer to the following part in developer guide.
Generating the Pinmux dtsi Files
Identifying the GPIO Number
Please note that the flash is required as you have to configure the pinmux for the pins you want to use.

Thank you for your kind answer.

  • /etc/nv_boot_control.conf
TNSPEC 3767-300-0005-T.1-1-0-jetson-orin-nano-devkit-super-
COMPATIBLE_SPEC 3767--0005--1--jetson-orin-nano-devkit-super-
TEGRA_BOOT_STORAGE mmcblk0
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0

Yes, I’m going to give a signal to three red, yellow, and green lamps with output to make them shine.
So I would like to use GPIO01(29 pin), GPIO11(31 pin), and GPIO13(33 pin).

Thank you for the reference.
If flash is inevitable, can I back up my current jetson’s settings?
(e.g. environment variable, python library)

Are you using the devkit or custom board for Orin Nano?

If you are using the devkit, I would suggest you download the pinmux spreadsheet first.
Let me take an example for GPIO01(PIN29 of 40pins header).
You can refer to Table 3-3. Expansion Header Pin Description – J12 in Jetson Orin Nano Developer Kit Carrier Board Specification first.
image
And configure it in pinmux spreadsheet as following.
image
After generating the pinmux/gpio dtsi, please refer to Generating the Pinmux dtsi Files to apply the change.

To prevent rootfs be erased, you can just flash QSPI only with the following command.

$ sudo ./flash.sh  -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nx-devkit-super internal

Or please refer to Cloning rootfs with initrd to backup your rootfs.