Welcome to Jetson ORIN NANO SUPER repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
04.GPIO output
GPIO output function
GPIO output function1. GPIO pin diagram comparison table2. Jetson orin super GPIO repair1. Busybox modifies registers (taking physical pin 31 as an example)2. Change the device tree (taking the change of physical pin 7 as an example)3. Program effect
1. GPIO pin diagram comparison table
GPIO.BOARD 12 pin corresponds to GPIO.BCM 18 pin:

2. Jetson orin super GPIO repair
Note: After upgrading to Jetson orin super, most GPIO ports have changed from the original bidirectional (input + output) to input only. Now two solutions are provided to modify GPIO to a bidirectional interface.
1. Busybox modifies registers (taking physical pin 31 as an example)
This solution is a temporary solution. After modifying the register configuration, it will become invalid every time it is restarted. If you need to keep it in effect, refer to the second solution.
The documents in the picture can be found in the attachment - jetson gpio, which are all found and downloaded from the official website (software data\data documents\jetson-gpio).
After inquiry, it is found that: physical pin 31 ---- corresponds to GPIO11--- corresponds to SOC_GPIO33, the corresponding PADCTL_G3 address = PADCTL_A0 is 0x2430000, and the corresponding SOC_GPIO33 is 0x2430070 (refer to the following picture)



Pinmux register address:


- The Offset is 0x70.
- The Pinmux register address is 0x2430070
1.1 Install busybox
sudo apt install busybox
1.2 Set the gpio pin to output:
xxxxxxxxxxsudo busybox devmem 0x02430070 w 0x004
1.3 Test output

xcd ~/jetson-gpio/samplesexport JETSON_MODEL_NAME=JETSON_ORIN_NANOpython3 simple_out.py
After the setting is completed, refer to the BCM code, change the code in the test case to the corresponding value, and then run the following test case to find the physical pin 31 Switching high and low levels back and forth
2. Change the device tree (taking the change of physical pin 7 as an example)
Note: This solution requires a certain understanding of the device tree and is not recommended for novices. After this solution is successful, the set gpio pin will become a bidirectional pin, that is, input + output.
Physical pin 7 corresponds to GPIO 09, corresponds to SOC_GPIO59, and the corresponding device tree name is soc_gpio59_pac6

Put the jetson-orin-gpio-patch-main file in software data\data document\jetson-gpio into jetson orin, open the pin7_as_gpio.dts file, and change the circled area to the GPIO pin you need to change

In jetson-orin-gpio-patch Run the following commands respectively
xxxxxxxxxxdtc -O dtb -o pin7_as_gpio.dtbo pin7_as_gpio.dts #You can change the generated file name according to the different GPIO port namessudo cp pin7_as_gpio.dtbo /bootsudo /opt/nvidia/jetson-io/jetson-io.py





Start the test:
xxxxxxxxxxcd ~/jetson-gpio/samples
xxxxxxxxxxexport JETSON_MODEL_NAME=JETSON_ORIN_NANO
xxxxxxxxxxpython3 simple_out.py
After the settings are completed, refer to the BCM code, change the code in the test case to the corresponding value, and then run the following test case, you can find that the physical pin 7 switches back and forth between high and low levels
3. Program effect
Use DuPont wire to lead out GPIO.BOARD 6 and GND pins, and use a multimeter to measure the pin voltage change:
Note: Do not connect incorrectly or cause pin short circuits, as mistakes may cause damage to the motherboard hardware!
