I am trying to run a simple program with python that outputs a ‘blinking’ signal to the GPIO pins that will turn LEDs on and off to test the implementation of the GPIO pins. I ran the same code on the Jetson Nano developer kit, but when I go to run it on the Jetson Orin Nano developer kit, nothing happens. The following is my code. Where am I going wrong?
import Jetson.GPIO as GPIO
import time
bwoo = 7
lellow = 15
gween = 29
wed = 31
pins = [bwoo, lellow, gween, wed]
GPIO.setmode(GPIO.BOARD)
for pin in pins:
GPIO.setup(pin, GPIO.OUT, initial=GPIO.LOW)
try:
while True:
GPIO.output(bwoo, GPIO.HIGH)
time.sleep(0.1)
GPIO.output(bwoo, GPIO.LOW)
time.sleep(0.1)
GPIO.output(lellow, GPIO.HIGH)
time.sleep(0.1)
GPIO.output(lellow, GPIO.LOW)
time.sleep(0.1)
GPIO.output(gween, GPIO.HIGH)
time.sleep(0.1)
GPIO.output(gween, GPIO.LOW)
time.sleep(0.1)
GPIO.output(wed, GPIO.HIGH)
time.sleep(0.1)
GPIO.output(wed, GPIO.LOW)
time.sleep(0.1)
except KeyboardInterrupt:
GPIO.cleanup()
Edit: We tried the sample code simple_out.py and there was no output to the GPIO pins
Where do I find that information?
At work at the moment. Will check when I get home and get back to you.
output was as follows:
#r36 (release), REVISION: 2.0, GCID: 35084178, BOARD: generic, EABI: aarch64, DATE: Tue Dec 19 05:55:03 UTC 2023
#KERNEL_VARIANT: oot
TARGET_USERPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia
This will no longer take effect on rel-36.
pin 7, 15, 29, 31 are all by default input pins, and you have to modify the pinmux spreadsheet to make them output pins.
https://docs.nvidia.com/jetson/archives/r36.2/DeveloperGuide/HR/JetsonModuleAdaptationAndBringUp/JetsonOrinNxNanoSeries.html#mb1-configuration-changes
Whenever I try to use the sheet that you download there, it comes up with syntax errors and is unusable, the other way doesn’t give the correct information for the right GPIO pins. Can you just tell me how to make the pins act as outputs because the information I’ve spent hours sifting through is doing no good.
Open the sheet with Excel on Windows.
Then copy the generated pinmux to a Linux PC for flashing.
How do you flash it with those files? The page you referred me to talks about saving those files in a bootloader directory, but you mentioned flashing with them. Which should I do? I am having a hard time navigating to where the nvidia page says to save the pinmux files from the excel sheet.
Save them and then flash with them.
Anything you don’t get?
What I don’t “get” is how to flash with those files using the sdk manager. Your answers are vague.
Modify the board config file to point to the new pinmux file.
Everything else is the same.
If you just cannot get this done, go back to JetPack 5.
But if I flash after I save those files, doesn’t that just erase everything?
Do this under Linux_for_Tegra
to re-flash only the bootloader:
sudo ./flash.sh --no-systemimg -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit internal
You won’t lose anything.
how do I navigate to the board config file?
Linux_for_Tegra/jetson-orin-nano-devkit.conf
PINMUX_CONFIG="tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi";
PMC_CONFIG="tegra234-mb1-bct-padvoltage-p3767-dp-a03.dtsi";
using the terminal, how do I navigate to that? I’m still not seeing how to get to it.
You should know where Linux_for_Tegra
is stored…
SDK Manager will tell you. I don’t really want to waste time on this.