I’m using an NVIDIA Jetson AGX Orin 64GB Developer Kit and I’m trying to drive one of the pins on the 40-pin GPIO header HIGH from the Linux command line.
I have not been able to find clear documentation or a working example that shows how to do this on AGX Orin.
What I’m looking for:
how to identify the correct GPIO corresponding to a physical 40-pin header pin
how to configure that pin as an output
how to set it HIGH from the Linux command line
whether the recommended method is via libgpiod, gpioset/gpioget, sysfs, or another interface
any JetPack / L4T specific steps or limitations
My setup:
Device: Jetson AGX Orin 64GB Developer Kit
Goal: drive a selected 40-pin header GPIO pin HIGH from Linux CLI
Based on the title and content of your topic, it looks like it may receive better visibility and feedback in a different category. We took the liberty of moving it for you.
If this was an incorrect assessment, please send me a direct message.
Disclaimer: this moderation suggestion and message were generated with AI assistance.
— 🤖 This is an automated AI response. I’m here to help, but please verify important details! —
To drive a selected 40-pin header GPIO pin HIGH from Linux CLI on the Jetson AGX Orin 64GB Developer Kit, follow these steps:
Identify the correct GPIO corresponding to a physical 40-pin header pin: You can find the pin mapping for the 40-pin header in the Jetson AGX Orin Developer Kit Carrier Board Specification document. For example, PIN15 of J30 is PN.01.
Set the pin HIGH from the Linux command line: You can use the gpioset command to set the pin HIGH. For example:
$ sudo gpioset --mode=wait `gpiofind "PN.01"`=1
This command sets the `PN.01` pin HIGH.
Recommended method: The recommended method is via libgpiod, which provides a more modern and flexible way of interacting with GPIOs. You can use the gpioset and gpioget commands to set and get the state of GPIO pins.
JetPack / L4T specific steps or limitations: Make sure to check the JetPack and L4T version compatibility. For JP6.x, you may need to apply the patch mentioned earlier.
Additional information: You can also use the sysfs interface to interact with GPIOs, but it is deprecated and not recommended.
Please note that the provided context does not cover the exact physical pin number on the 40-pin header or the current pinmux or device-tree configuration. If you provide this information, I can give more specific guidance.
— We support team will also look into your issue to have further suggestions soon. please stay tuned. —
Hello!
Opening this up again as I have gone ahead and tried using this pin, as it shows up as gpiochip0 line 85, which I can write to, however upon testing with a multimeter and an LED, the pin is not driven high at all.
I updated my version of Jetpack to 6.2.2 r36.5 and I am unable to drive the GPIO high. Please help!
Currently my fprime implementation (Flight software) opens a GPIO using its built in OSAL gpiodriver that uses a watchdog component ive written, that pings the on board watchdog circuitry. As you can see below, the fprime implementation has accessed and opened the GPIO, however, I have an LED on the watchdog circuitry that should light up every time the GPIO is driven high. Despite the GPIO being rated for 24mA, and the LED having a forward current rating of 20mA the LED should be blinking on every pet/unpet cycle.
Here is the terminal output when running
Hello!
I have gone ahead and written a script with the following code:
#!/usr/bin/env bash
while true; do
gpioset --mode=wait 'gpiofind "PN.01"'=1
sleep 1
gpioset --mode=wait 'gpiofind "PN.01"'=0
sleep 1
done
Upon running I get the following response from the terminal
((fprime-venv) ) jpl-jetson@ubuntu:~/fprime-scales-ref$ ./bash_wd_test.sh
gpioset: at least one GPIO line offset to value mapping must be specified
gpioset: at least one GPIO line offset to value mapping must be specified
gpioset: at least one GPIO line offset to value mapping must be specified
gpioset: at least one GPIO line offset to value mapping must be specified
Upon further investigation, if I utilize this repo I can drive the GPIO on my board HIGH and LOW using pin 15. By running a small python script I can verify that using this library I can drive the pin high, as the LED I have wired directly to it lights up and turns off accordingly.
When you ask about pin muxing, this last step would not work if the pin was not alreayd preconfigured to be muxed, correct?
All I need to know is the gpiochip0 line offset for the pin, is there a way I can traceback the GPIO.BOARD mapping back to its gpiochip0 line offset, so that my Fprime OSAL can call it directly using C++? Having to integrate this in python just to get this functionality would require some refactoring of our components.
Thank you!
After doing some more digging, I was able to run the python library to toggle the GPIO HIGH and then using ```gpioinfo gpiochip0```I was able to see which gpiochip0 line had changed from before I toggled the GPIO HIGH. I discovered the proper pinout for PIN 15 corresponds to gpiochip0 line 108. This is now working. I would like to know why all the recommendations on what to do were giving the wrong gpio lines, including the specification document, and gpioinfo.
GPIO numbering/naming may be differ from the different perspectives.
If you want to control PIN15 of 40pins header on AGX Orin devkit, you can check the NVIDIA Jetson AGX Orin Developer Kit Carrier Board Specification first.
It gives you the PN.01.
So, you can run the following command to check the its line from gpiod.
Please note that the --mode=wait is to ensure the pin state being controlled.
If you terminate the process, then the pin state may be recovered to original state.