Jetson Nano GPIO goes high, but not low

I have an odd problem with the Jetson Nano dev kit. I’ve tried to enable pull-ups and pull-downs on the SPI1 CS0
(24) and CS1 pins (26) on the 40-pin connector. With my multimeter I can measure with 0 V or 3.3 V.

Initially I had the pull-ups set and then connected a on-off-on switch from 24 and 26 to ground. I can then use:

sudo gpiomon gpiochip0 19 20

I can see the pin go low, but it never goes high. If I disconnect my jumpers and use my multimeter, the pin is now 0V instead of 3.3V. So it appears the pull-ups stopped working. I got frustrated with this so I build the following wire harness:
https://imgur.com/a/BbCKjDR

So I now have pull-ups and pull-downs. I can now get the Jetson to see the rising edge, but not the falling edge.

- Board:                                                                                                                                                                           Author: Raffaello Bonghi
    * Name:           NVIDIA Jetson NANO/TX1                                                                                                                                         e-mail: raffaello@rnext.it
    * Type:           NANO/TX1
    * Jetpack:        4.2.2 [L4T 32.2.1]
    * GPU-Arch:       5.3
    * SN:             142211907582008080FF
  - Libraries:
    * CUDA:           10.0.326
    * cuDNN:          7.5.0.56-1+cuda10.0
    * TensorRT:       5.1.6.1-1+cuda10.0
    * VisionWorks:    1.6.0.500n
    * OpenCV:         3.3.1 compiled CUDA: NO

hello Shadowmind,

there’s a Python library that enables the use of Jetson’s GPIOs, https://github.com/NVIDIA/jetson-gpio.
could you please configure the GPIO with the sample applications.
thanks

Nope, that library doesn’t work. I have pull-downs enabled, yet it always reads high. I tried both pins 24 and 26
Here is my code:

import RPi.GPIO as GPIO
import time

# Pin Definitions
input_pin = 26  # BOARD pin 26

def main():
    prev_value = None

    # Pin Setup:
    GPIO.setmode(GPIO.BOARD)  # BCM pin-numbering scheme from Raspberry Pi
    GPIO.setup(input_pin, GPIO.IN)  # set pin as an input pin
    print("Starting demo now! Press CTRL+C to exit")
    try:
        while True:
            value = GPIO.input(input_pin)
            if value != prev_value:
                if value == GPIO.HIGH:
                    value_str = "HIGH"
                else:
                    value_str = "LOW"
                print("Value read from pin {} : {}".format(input_pin,
                                                           value_str))
                prev_value = value
            time.sleep(1)
    finally:
        GPIO.cleanup()

if __name__ == '__main__':
    main()

hello Shadowmind,

you might also have pinmux customization to configure SPI_1_CS0 / SPI_1_CS1 as GPIOs.
please access Jetson Nano Pinmux through download center,
please also check the documentation, Jetson Nano Developer Kit 40-Pin Expansion Header Configuration for the pinmux customization.
here’s discussion thread for your reference, Topic 1062646.
thanks

I found the problem. The Jetson Nano carrier board uses the TXB0108RGYR, which is a weird buffer that determines direction by sinking/sourcing current. This also means the I/O are 3.3V tolerant, which wasn’t evident by the pinmux tool (indicates 1.8V I/O).

If you pull a pin high with a pull-up, then the buffer tries to drive as an output.

@Shadowmind May you please Say few words on how did you fix this?
IT looks for me that I have same problem - whatever I connect the pin to ( vcc or gnd) it stays high or low until reboot. I am getting out of my MIND. :(

Hi michal.rusinowski,

Please help to open a new topic if it’s still an issue. Thanks