I’ve been trying to get GPIO working with an official Nvidia Jetson Orin Nano Developer Kit, but I keep on running into this error and I was wondering if anyone knew how to fix it.
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib/python3/dist-packages/Jetson/GPIO/init.py”, line 1, in
from .gpio import *
File “/usr/lib/python3/dist-packages/Jetson/GPIO/gpio.py”, line 70, in
model, JETSON_INFO, _channel_data_by_mode = gpio_pin_data.get_data()
File “/usr/lib/python3/dist-packages/Jetson/GPIO/gpio_pin_data.py”, line 438, in get_data
raise Exception(‘Could not determine Jetson model’)
Exception: Could not determine Jetson model
here’re some examples for using libgpiod,
please make sure these setting are there in your pinmux BCT file for the pin you want to control. and please remember the function has to be rsvd. nvidia,tristate = <TEGRA_PIN_DISABLE>; nvidia,enable-input = <TEGRA_PIN_ENABLE>;
Commands, gpioget, gpiofind, gpioinfo.
Here’s an example to configure tegra234-gpio-aon/gpio-327/PBB.03 # gpioinfo gpiochip1|grep PBB.03 line 11: "PBB.03" unused input active-high
Toggle the pin state by gpioset. # gpioset --mode=exit --drive=push-pull gpiochip1 11=1 # gpioinfo gpiochip1|grep PBB.03 line 11: "PBB.03" unused output active-high
I am assuming you did install this sudo pip3 install Jetson.GPIO
The only board we had crapped out and it was sent back. No one has stock in the USA so until we can purchase some more boards I have no way to work on this, sorry.
Also, the device tree was modified to enable outputs.
@JerryChang thank you, “Could not determine Jetson model” Error issue was indeed solved after installing Jetson.GPIO version 2.1.9.
However, the GPIO pins (at least in my case) still can’t be toggled neither on JetPack 6.0 nor 6.2
What has been done so far (for both versions of JetPack): Step 1: I installed Jetson.GPIO version 2.1.9 and set user permissions following Jetson.GPIO ReadME
Step 2: Tried running a simple example from RidgeRun Developer Wiki to toggle pin 40 on the expansion header while measuring voltage using multimeter connected to Pin 40 (signal) and Pin 6 (GND). The code didn’t throw any exceptions but the voltage readings remained 0 V. Step 3: I used gpioset to toggle pin 40 (and pin 32) and observed no change in voltage as well.
To do this, I located output lines using gpioinfo and verified in the Jetson Orin Nano Developer Kit Carrier Board Specification the correspondence between the SoC GPIO Port Number and the pin number:
gpioinfo | grep "output"
Output:
line 41: "PG.06" unused output active-high # Anna: Pin 32
line 49: "PH.06" unused output active-high
line 51: "PI.00" unused output active-high # Anna: Pin 40
line 68: "PK.04" unused output active-high
line 69: "PK.05" unused output active-high
line 103: "PQ.03" unused output active-high
line 138: "PAC.00" unused output active-high
Then I ran
(sudo) gpioset --mode=wait 0 51=1
and observed no voltage change.
I have tried it on two available Orin Nano boards, so this imo excludes HW issues.
@JerryChang can you please let me know what am I missing to make GPIO pins respond?
@JerryChang I referred to pinmux manual on Developer Guide and other NVIDIA forum threads but frankly I couldn’t even find what is BCT file and how to access it. The closest at least from the syntax perspective was DTS file described in Pinmux and GPIO configuration but the path to this file doesn’t make any sense to me either.
Alternatively, I found that pinmux can be modified dynamically starting from SDK6.0 but I couldn’t map your suggested solution to this manual.
Can you please provide more detailed instructions for your suggested solution?
it’s pinmux configuration file after you have Jetpack release installed to your host machine.
for instance, ~/nvidia/nvidia_sdk/JetPack_6.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi
please revise those settings for testing, you should re-flash the board completely to apply the changes.
I had the same problem and couldn’t solve it, not even by modifying the pinmux file. I started to suspect that the issue was related to the firmware and the JetPack version.
I have three Jetson Orin Nano development kits, and I experienced the same issue with all of them. I tested JetPack 6, 6.1, and 6.2, but in none of these cases did the GPIOs work.
The only solution I found was to downgrade the firmware and JetPack to version 5. Once I reverted to JetPack 5, the GPIOs worked without any issues.
In my case, I needed to connect a stepper motor, an RPLidar sensor, a DHT101, an ultrasonic sensor, and a temperature sensor. With JetPack 5, all of these devices work without any problems.