I’m trying to use GPIO17 (pin 22 on 40-pin header) as an output GPIO, but I can’t get the voltage level to change from low to high, or from high to low using gpiod tools, libgpiod, or the Jetson.GPIO python library.
I’m able to change the starting output level (drive 0 or drive 1) by chaning the pinmux MB1 configuration in the Pinmux spreadsheet and reflashing my board, but I can’t change the output level at runtime using they gpiod tools, or through the pinmux register directly.
Setting GPIO17 (SOC_GPIO23), GPIO3_PP.04, as Bidirectional and Drive 1 in the pinmux spreadsheet, I see 1.6V on pin-22 of the 40-pin header after boot. Likewise if I set GPIO17 to Drive 0 in the pinmux spreadsheet, the voltage level on pin-22 after boot is 0V. Using gpioset to change the output level after boot, does not change the voltage level on pin-22.
I’ve tried to verified that gpioset is chaning the pinmux registers for PP.04, which it looks like it is, yet the voltage level of pin-22 does not change.
Example:
- GPIO17 configured as Bidirectional and Drive 1 in pinmux spreadsheet.
- After booting pin-22 shows 1.6V
~$ sudo gpioinfo | grep PP.04
line 96: "PP.04" unused output active-high
PADCTL_G3_SOC_GPIO23_0:
~$ sudo busybox devmem 0x02430020
0x00000040
GPIO_P_ENABLE_CONFIG_04_0:
~$ sudo busybox devmem 0x02212480
0x00000003
GPIO_P_OUTPUT_CONTROL_04_0:
~$ sudo busybox devmem 0x0221248c
0x00000000
GPIO_P_OUTPUT_VALUE_04_0:
~$ sudo busybox devmem 0x02212490
0x00000001
Pinmux registers for PP.04 look correct after boot based on my current MB1 Pinmux configuration, GPIO17 - Bidirectional - Drive 1.
If I try to set the output level of line 96 (PP.04) to 0 using gpioset, the voltage level of pin-22 i remains at 1.6V.
With “sudo gpioset -m wait 0 96=0” active:
~$ sudo gpioinfo | grep PP.04
line 96: "PP.04" "gpioset" output active-high [used]
PADCTL_G3_SOC_GPIO23_0:
~$ sudo busybox devmem 0x2430020
0x00000040
GPIO_P_ENABLE_CONFIG_04_0:
~$ sudo busybox devmem 0x02212480
0x00000003
GPIO_P_OUTPUT_CONTROL_04_0:
~$ sudo busybox devmem 0x0221248c
0x00000000
GPIO_P_OUTPUT_VALUE_04_0:
~$ sudo busybox devmem 0x02212490
0x00000000
Based on the pinmux registers for PP.04, it looks like when I set the GPIO output to 0, the GPIO pinmux registers are getting configured correctly to driving the pin low, but it still shows 1.6V on my multimeter.
What am I doing wrong? Am I looking at the correct pinmux registers for Orin AGX pin-22?