Unable to reliably control a GPIO on Jetson Orin Nano (JetPack 6.2.1)

Hello,

My goal: control a simple GPIO (because for a SPI communication I need a custom CS control with extra-timing)

Hardware : Jetson Orin Nano Super Developer Kit

Software / Environment: JetPack 6.2.1

What works: I succeed to setup and validate SPI with Jetson-IO tool and spiDev succesfully

What I tried:

  1. Jetson-IO GPIO configuration : I tried to configure a pin as GPIO output or input from the Jetson-IO tool but it is not not supported (no option available)

  2. Device tree overlay :

→ I added a custom DT overlay to configure a pin as GPIO and it is detected correclty with “sudo /opt/nvidia/jetson-io/config-by-hardware.py -l”

→ I tested with the “gpioinfo, gpioget , gpioset” tools without any luck: when I check with a multimeter, the level is randomly changing between 3.3V, 0V and 1.5V.

I am aware there is a patch to apply to avoid issue with GPIO but I do not have a Linux Host system to flash the system. I do not want a solution for rewritting the whole device tree file by reflashing the image (only available from a linux Host system).

My question is simple:
What is the simplest and officially supported way to control a GPIO on a Jetson Orin Nano today? Should I use Jetson SDK 5.X? Should I wait for a new release?

Thanks!

Hi sfeutrier,

I believe that your issue is caused from the bit 10 of pinmux register has been set.
Please apply the patch from the following thread to check if it could help for your case.
40hdr - SPI1 gpio padctl register bit[10] effect by gpiod tools in JP6 - #20 by KevinFFF
You can simply update the /boot/Image instead of reflashing the board to apply the change.

Hi KevinFFF,

Applying the patch seems to involve a lot of steps (like I can see on the following post How to apply GPIO patch for Jetpack 6.x for Orin AGX Devkit - #4 by nagesh_accord )
Can you confirm?
It does not seem simple at all because I have never done a custom kernel, flashing with external linux host…I

I’m already stuck at the first step : getting the source. I don’t have them so obviously I don’t have ”source_sync.sh”.

That’s almost 2 years the patch is needed and we still need to go through many step for something that should be straight-forward

Edit: if I use GitHub - NVIDIA/jetson-gpio: A Python library that enables the use of Jetson's GPIOs library you provide, do I still need the patch?

That patch will be included in the next Jetpack 6 release.
Before the next official release, please try to apply it manually.

It should be existing in your BSP package. (i.e. <Linux_for_Tegra>/source/source_sync.sh)
Please refer to Kernel Customization — NVIDIA Jetson Linux Developer Guide for the steps to build kernel.

Yes, it is Jetson.GPIO library created by Python and it will also call that gpiod from kernel driver.

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