AGX Orin cannot control 40-pins output

i use agx orin device, and jetpack6.2, and ubuntu22.04, and jetson-gpio library.
i want to control board-37-pin from GPIO.HIGH to GPIO.LOW, my code is the following, but it cannot work, so what should i do?

import Jetson.GPIO as GPIO
import time

output_pin = 37

def main():
    GPIO.setmode(GPIO.BOARD)  
    GPIO.setup(output_pin, GPIO.OUT, initial=GPIO.HIGH)

    print("Starting demo now! Press CTRL+C to exit")
    curr_value = GPIO.HIGH
    try:
        while True:
            time.sleep(3)
            print("Outputting {} to pin {}".format(curr_value, output_pin))
            GPIO.output(output_pin, curr_value)
            curr_value ^= GPIO.HIGH
    finally:
        GPIO.cleanup()

if __name__ == '__main__':
    main()

Hi eric.ma1,

Are you using the devkit or custom board for AGX Orin?

Have you configured the pinmux for this pin in pinmux spreadsheet as following?
image

Do you also get a scope to check its state?

i use devkit. and i don’t configure anything of pinmux, so it is the default. i just write this code and run it.


i just use board pin 13, and it could work, but sometimes the HIGH value is 3.3V, the LOW value is 1.6V. And sometimes the HIGH value is 1.6V, the LOW value is 0V, is it correct?

HIGH should be 3.3V and LOW should be 0V.

First, I would suggest you configuring pinmux and refer to Jetson AGX Orin Platform Adaptation and Bring-Up — NVIDIA Jetson Linux Developer Guide to apply the change.

Second, please apply the patch in 40hdr - SPI1 gpio padctl register bit[10] effect by gpiod tools in JP6 - #20 by KevinFFF for the known issue we found in JP6.x.