I am trying to turn on/off LED with GPIO with no success, it says off from the outset. I am on Jetson Orin Nano Devkit 8GB. I am using the simple code shown below and also tried /usr/share/doc/jetson-gpio-common/samples/simple_out.py on BOARD PIN15 .
Thanks for looking into this. Attached snapshots. I followed this tutorial to get it setup, and tested different PINs, latest in PIN12 shown on the snapshots.
I connect the Jetson via USB-c to ubuntu 22.04 host and ssh into it.
base) sergio@jetson:~$ python3
Python 3.11.5 (main, Sep 11 2023, 13:14:08) [GCC 11.2.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import Jetson.GPIO as GPIO
led_pin=12
GPIO.setmode(GPIO.BOARD)
GPIO.setup(led_pin,GPIO.OUT,initial=GPIO.HIGH)
I open another terminal window:
(base) sergio@jetson:~$ sudo cat /sys/kernel/debug/gpio | grep PH.07
[sudo] password for sergio:
gpio-398 (PH.07 |Jetson-gpio ) out hi
(base) sergio@jetson:~$
Hi @DaveYYY Does this require editing the device tree and recompiling the kernel, or can i do this with Jetson-io tool ? Sounds like an overkill otherwise 😅
I would really appreciate you point me where in the documentation to be sure please.
Can I confirm with you this is where I need to make the changes (mine is a Jetson Orin Nano [8GB developer kit version] P3767-0005 module P3768-0000 carrier board)
SDK Manager fails to flash when I replace the pinmux file, attached log file.
Process:
I formatted my SD card and flashed Jetpack 6 with SDK Manager to have a clean version. Also signed in to let Jetson setup the user by ubuntu os etc. Then:
2.changed with xls pinmux as you explained and copied the pinmux file created by the macros to the ~/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/generic/BCT/Orion_tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi
Changed at /home/sergio/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/jetson-orin-nano-devkit.conf PINMUX_CONFIG to point to new pinmux filename
PINMUX_CONFIG=“tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi”;
For
PINMUX_CONFIG=“Orion_tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi”;
I assume I do not need to also copy gpio.dtsi and padvoltage.dtsi, but if I need to copy these too, do I also change the pointing files in the config file and in particular where in the Linux_for_Tegra/jetson-orin-nano-devkit.conf file is the variable to point to the gpio.dtsi file?
Linux_for_Tegra/jetson-orin-nano-devkit.conf file for board_FAB TS1 EB1 also has variable pointing to pinmux file. Do I need to change this one too?
Error Log snippet:
14:36:08.858 - info: NV_L4T_FLASH_JETSON_LINUX_COMP@JETSON_ORIN_NANO_TARGETS: [ 1.2007 ] Pre-processing config: Orin-tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi
14:36:08.858 - error: NV_L4T_FLASH_JETSON_LINUX_COMP@JETSON_ORIN_NANO_TARGETS: Error: Return value 1
14:36:08.858 - info: Event: NV_L4T_FLASH_JETSON_LINUX_COMP@JETSON_ORIN_NANO_TARGETS - error is: Error: Return value 1
14:36:08.859 - info: NV_L4T_FLASH_JETSON_LINUX_COMP@JETSON_ORIN_NANO_TARGETS: Command cpp -nostdinc -x assembler-with-cpp -D IN_DTS_CONTEXT -I … -I …/generic/BCT Orin-tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi Orin-tegra234-mb1-bct-pinmux-p3767-dp-a03_cpp.dts
14:36:08.873 - error: NV_L4T_FLASH_JETSON_LINUX_COMP@JETSON_ORIN_NANO_TARGETS: Error: /home/sergio/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/signed/flash.idx is not found
14:36:08.873 - info: Event: NV_L4T_FLASH_JETSON_LINUX_COMP@JETSON_ORIN_NANO_TARGETS - error is: Error: /home/sergio/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/signed/flash.idx is not found
14:36:08.873 - error: NV_L4T_FLASH_JETSON_LINUX_COMP@JETSON_ORIN_NANO_TARGETS: Error: failed to relocate images to /home/sergio/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/images
14:36:08.873 - info: Event: NV_L4T_FLASH_JETSON_LINUX_COMP@JETSON_ORIN_NANO_TARGETS - error is: Error: failed to relocate images to /home/sergio/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/images
14:36:08.878 - info: NV_L4T_FLASH_JETSON_LINUX_COMP@JETSON_ORIN_NANO_TARGETS: Cleaning up…
14:36:08.885 - error: NV_L4T_FLASH_JETSON_LINUX_COMP@JETSON_ORIN_NANO_TARGETS: [exec_command]: /bin/bash -c /tmp/tmp_NV_L4T_FLASH_JETSON_LINUX_COMP.sergio.sh; [error]: /home/sergio/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/L4TConfiguration.dtbo: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property
Thank you.
My Jetson etson Orin Nano [8GB developer kit version] P3767-0005 module P3768-0000 carrier board
Yes my bad. But what is the variable for gpio.dtsi in the Linux_for_Tegra/jetson-orin-nano-devkit.conf to point to the new file I save ? I do not see this anywhere in the documentation please.
About board_FAB, I am changing the filename in case, does this apply to Jetson etson Orin Nano [8GB developer kit version] P3767-0005 module P3768-0000 carrier board?, this is the snippet for Linux_for_Tegra/jetson-orin-nano-devkit.conf :