Jetson Nano Super dev kit: GPIO as input

I have just got my new Jetson Nano Super Dev kit up an running. It is using Jetpack 6.x (likely the latest versions of everything). I am trying to create a “blink LED” script. My internet research suggests that maybe the kit does not default to having my GPIO pins act as outputs. Before I “brick” my new nano, can someone confirm that I need to adjust my “pinmux”? It seems so crazy to me, that an edge AI device like this does not support OUTPUT, out of the box. And if so, maybe point me at a specific guide to follow so that I make the proper adjustments.

Much appreciated. Also, I did search, and I am sure that has been asked before, so I apologize for that in advance.

*** Please note that this reply is generated by LLM automatically ***

Congratulations on getting your new Jetson Orin Nano Super Dev kit up and running. I’m happy to help you with your question.

To confirm, yes, you are correct that the GPIO pins on the Jetson Orin Nano do not default to output mode. This is because the pins are multiplexed, meaning they can be configured to perform different functions. This is a common design approach in embedded systems, as it allows for more flexibility and reduces the number of pins required.

To use the GPIO pins as outputs, you will need to configure the pinmux settings. Pinmux stands for “pin multiplexing,” which refers to the process of configuring the pins to perform a specific function.

To adjust the pinmux settings on your Jetson Orin Nano, you can follow these general steps:

  1. Determine which pins you want to use as outputs. You can refer to the Jetson Orin Nano Developer Kit Carrier Board Design Files and the Jetson Orin NX/Nano Dev Kit documentation to determine which pins are available for GPIO use.
  2. Use the jetson-io tool to configure the pinmux settings. This tool is part of the Jetson Linux distribution and allows you to configure the pinmux settings for the Jetson module.
  3. Use the gpio command to set the direction of the GPIO pins to output.

Here is an example of how to use the jetson-io tool to configure the pinmux settings for the Jetson Orin Nano:

sudo jetson-io

This will launch the jetson-io tool, which will allow you to configure the pinmux settings for the Jetson module.

Once you have configured the pinmux settings, you can use the gpio command to set the direction of the GPIO pins to output. For example:

sudo gpio mode <pin_number> out

Replace <pin_number> with the actual pin number you want to use as an output.

Here is a specific guide you can follow to configure the pinmux settings and use the GPIO pins as outputs on your Jetson Orin Nano:

  • Jetson Orin NX/Nano Dev Kit documentation: This documentation provides detailed information on the pinmux settings and how to configure them using the jetson-io tool.
  • Jetson Linux documentation: This documentation provides information on how to use the gpio command to set the direction of the GPIO pins.
  • NVIDIA Developer Forums: The NVIDIA Developer Forums are a great resource for getting help with Jetson-related questions. You can search for existing threads or create a new thread to ask for help.

In comparison to other edge AI devices, the Jetson Orin Nano is not unique in requiring pinmux configuration to use the GPIO pins as outputs. Many embedded systems require pinmux configuration to use the GPIO pins, as it allows for more flexibility and reduces the number of pins required.

However, it’s worth noting that some edge AI devices may have GPIO pins that are configured as outputs by default. For example, the Raspberry Pi has GPIO pins that are configured as outputs by default, making it easier to use them for simple projects like blinking an LED.

In summary, to use the GPIO pins on your Jetson Orin Nano as outputs, you will need to configure the pinmux settings using the jetson-io tool and then use the gpio command to set the direction of the GPIO pins to output. I hope this helps, and happy tinkering with your new Jetson Orin Nano Super Dev kit!

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

jetson-io is not a valid command. I found a directory /opt/nvidia/jetson-io, and jetson-io.py inside there. When I choose Configure for compatible hardware, I get these options:

| Adafruit SPH0645LM4H |
| Adafruit UDA1334A |
| FE-PI Audio V1 and Z V2 |
| ReSpeaker 4 Mic Array |
| ReSpeaker 4 Mic Linear Array

I would like all of my GPIO pins to be allowed to be set as inputs or outputs via a python script.

Do you mean the GPIOs on the 40-pin Expansion Header? Some of the pins default to GPIO output. Refer to Table 3-3 of the Jetson Orin Nano Developer Kit Carrier Board Specification. Note that all of the Expansion Header pins are 3.3V.

Typically the GPIO functionality is configured in the Jetson Orin NX Series and Jetson Orin Nano Series Pinmux.

Thanks so much for those resources. Last night I was following a guide by jetsonhacks to create a device tree overlay. I tried my best, but the overlay was unbootable. It is my understanding that the device tree overlay is the safer approach than using Excel, as it offers the overlay as a boot option (I would not be surprised if i am wrong). If I messed up using the Excel method, would my system be unbootable, as it is not offering the changes as a boot option?

My goal is to make some pins (GPIO?) available for output. To start I want to blink an LED. In the long term, I want to control a PML DC motor (I have a motor and motor controller board), read the motor/s encoder, and read a separate rotary encoder. Also, why not just make all the GPIO pins allowed to switch from input to output. My first attempt was to make output available for GPIO12.

Here is the dts file I created (it is unbootable). Blame Grok for any issues.

cat jetson-gpio12.dts
/dts-v1/;
/plugin/;

/ {
overlay-name = “Nano Blink”;
compatible = “nvidia,p3768-0000+p3767-0005”, “nvidia,tegra234”;

    fragment@0 {
        target-path = "/pinmux@2430000/pinmux_default";
        \__overlay_\_ {
            gpio12_output {
                nvidia,pins = "PP.00";
                nvidia,function = "gp";
                nvidia,pull = <0x0>;
                nvidia,tristate = <0x0>;
                nvidia,enable-input = <0x1>;
            };
        };
    };

Using the overlay should be easier/safer.

There is a chance you could break something that prevents booting, but it would not brick your system, if that is your concern. You would just power down and go back into recovery mode and reflash a known good (e.g. default) image and it will boot up again.

That code from Grok isn’t what I’m used to seeing so not sure that it would work. The first issue is that GPIO12 should be the PN.01 pin, not PP.00. From the Orin Nano pinmux spreadsheet:

Usually the programmed values instead of 0 or 1 used in the Grok code would be <TEGRA_PIN_ENABLE> or <TEGRA_PIN_DISABLE> for readability/easier understanding of what’s being done.

This section of the Jetson Linux Developer Guide has a tool to help reconfigure pins on the 40-pin expansion header. The GPIO12 you are programming is on pin 15, called “pwm1” in the screen cap, since the non-GPIO function (SFIO or special function I/O) of the pin is PWM1. It includes an option of exporting as Device-Tree Overlay, so it takes care of the code for you.

Further down at that link are commands line entries for setting GPIO output values with “gpioset”.

I really appreciate your response. I will dig into this over the weekend. Thanks so much!

When I use jetson-io.py to modify the 40 pin header, I get the following.

| Select desired functions (for pins): |
| |
| aud (7) |
| extperiph3_clk (29) |
| extperiph4_clk (31) |
| i2s2 (12,35,38,40) |
| pwm1 (15) |
| pwm5 (33) |
| pwm7 (32) |
| spi1 (19,21,23,24,26) |
| spi3 (13,16,18,22,37) |
| uarta-cts/rts (11,36)

The documentation shows:

I found a solution that enables GPIO09 (pin 7), here:

This allowed me to blink an LED, my first milestone! Hopefully I can use that as a reference to get my longer term IOs working as well.

Thanks so much for your help. You can close this topic.

1 Like