How to toggle GPIO pins in Orin nano jetpack 6.0 dynamically

I’m currently working on the Orin Nano using Jetpack 6 and encountering difficulties toggling GPIO pins dynamically. Specifically, I’m aiming to toggle pins 7, 29, and 30 based on the Orin Nano GPIO pinout. I’ve tried different approaches, including Python scripts with the Jetson.GPIO library and using the libgpiod library’s gpioset command (e.g., gpioset PAC.06=1 for pin 7). However, I’m facing issues as the expected high voltage isn’t registering on the multimeter for the respective pin. Additionally, I’ve noticed the absence of a ‘gpio’ folder under the ‘/sys/class/’ directory in Jetpack 6. Any insights or guidance on effectively toggling these pins would be greatly appreciated.


Please first confirm the pin you want to use is set as either output or bidirectional in the pinmux spreadsheet.

You should control the GPIO chip with offset, not directly the pin.
For example, I tested with pin 18 (PH.00) locally on my AGX Orin

nvidia@tegra-ubuntu:~$ sudo gpiofind PH.00
gpiochip0 43

nvidia@tegra-ubuntu:~$ sudo gpioset --mode=wait 0 43=1

Toggles the pin with high voltage,

nvidia@tegra-ubuntu:~$ sudo gpioset --mode=wait 0 43=0

toggles the pin with low voltage.

It’s important to use --mode=select or specifying other mode parameters, as the effect of gpiod only lasts until the program ends, and this parameter gives you an option on how you want the program to end/return, so the change in high/low voltage lasts longer.

This is expected as the GPIO sysfs has been deprecated in the upstream Linux kernel a long time ago. We still enable it in JetPack 5, but in JetPack 6, we align with the upstream, so it’s no longer available.

pin is set as output in pinmux spreadsheet,
there is no command found for gpiofind,and also for gpioset --mode
I am getting error: gpioset: unrecognized option ‘–mode=wait’
now what is solution for this

Did you install the right package?

sudo apt install gpiod

Also, it’s double dashes -- instead of -.

now I properly installed the gpiod,for the sudo gpiofind PAC.06
I am getting output gpiochip0 144,so now I did the sudo gpioset --mode=wait 0 144=1 but still I am not getting high voltage on multimeter,is there any other solution to toggle this?

Have you tried other pins on the expansion header?

yeah I tried other pins,those are also not toggling

Flash JetPack 5 and see if you are able to control it via sysfs.

in JetPack 5 we are able to control it via sysfs,but we need to control it in the JetPack 6

Maybe find another module/carrier board for test.
This is the standard way of controlling GPIO on JetPack 6, and I’m sure it’s working.

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