GPIO button seems to latch, maybe wrong resistor value but unsure of cause

I’ve wired a tactile push button switch to the Jetson Nano, active low with a 10 kohm resistor to +3.3 volts, connected to header pin number 33 (which is GPIO 13)

Installed Jetson.GPIO and wrote some python to use it. When I initialize the pin, I use GPIO.PUD_OFF.

The problem is, GPIO.input returns 1 when not pressed, when I press it just once and release it, GPIO.input returns 0, and then it will never return 1 ever again even though I release the button.

Then of course I troubleshoot with a multimeter, it measures 3.3V when released and 0V when pressed, the hardware appears to be fine.

The funny thing is, if I measure it with a multimeter, GPIO.input will start to return 1 again. So now, I’ve alligator-clipped my multimeter to the signal and now the entire script works as expected… I can get both 1s and 0s and the event callback fires as expected.

This seems to indicate that my 10 kohm resistor is too much resistance? Are there filtering capacitors or parasitic capacitances I am not aware of? Are there ESD protection diodes that’s messing with the signal? I can’t find DC electrical characteristics of the Jetson Nano’s GPIOs. Can somebody explain what’s wrong?

What is my best next move? Lower the resistor value to 4.7K? or maybe even 1K? Remove all resistors and depend solely on pull_up_down=GPIO.PUD_UP?

Thanks

Hi, please share the diagram of the connection of this button.

I have confirmed that I’m getting bit by this bug

This explains everything. I forgot where but I also read how the SoC defaults to using internal pull-down resistors.

I also required my buttons to be active-high with pull-down resistors and now the entire script functions as it should.

So let this be a warning to all users, do NOT attempt to implement active-low buttons, only active-high works.

EDIT: Ok the situation has been explained below. It seems like MOST pins are defaulted to pull-down. The internal resistance can be very low so a 10 Kohm external resistor would be too high. My recommendation would be to check the chart to see if it is pull-up or pull-down, and implemented active-low for the pins that are pull-up and vice versa.

Were you able to solve this by just switching to an active-high button? You kept everything else and it worked?
Thanks!

Can you share a picture of the way that you have connected the switch and the location of the pull up resistor?

Hello!

We are currently reviewing this to understand that issue, however, I do want to point out that different GPIOs on the 40-pin expansion header do have different pull-up/down configurations by default (ie. not all are pulled-down but maybe pulled-up) and that the internal pull strength does vary depending on the pins. So active-high may not work for all GPIOs by default.

If you refer to section ‘9.3 MPIO Pad Description’ of the Tegra X1 (SoC) Technical Reference Manual (available via the download centre), you will see that there are several different pad types, namely, ST, CZ, DD, LV_CZ, and others. Now the internal pulls vary by pad type …

ST --> 100k
CZ --> 18k
DD --> 100k
LV_CZ --> 15k

So to know the strength of the internal pull you need to first understand the pad type. The various tables in section 4 of the ‘Jetson Nano System-on-Module Data Sheet’ show the pad type for the different pins. For example, in section ‘4.7.2 Serial Peripheral Interface’ for the SPI pins you will see they are a mixture of CZ and LV_CZ. However, now you need to know the mapping of the pins to the 40-pin header.

To make things a bit easier here is a summary of the default pull configuration and strength for GPIOs on the Jetson Nano (which hopefully I have correct based upon reviewing the current settings):

Pin Default Pull Configuration
7 High (100K internal)
8 None
10 Low (100K internal)
11 Low (100K internal)
12 Low (100K internal)
13 Low (18K internal)
15 Low (100K internal)
16 Low (18K internal)
18 Low (18K internal)
19 Low (15K internal)
21 Low (15K internal)
22 Low (18K internal)
23 Low (15K internal)
24 High (15K internal)
26 High (15K internal)
29 High (100K internal)
31 High (100K internal)
32 Low (100K internal)
33 Low (100K internal)
35 Low (100K internal)
36 Low (100K internal)
37 Low (18K internal)
38 Low (100K internal)
40 Low (100K internal)

It is possible to disable the pull completely or change the pull type from pull-up to pull-down or vice-versa, but to change this we need to generate a new default pin configuration for the Nano, which unfortunately at the moment is a bit of a convoluted process, but nonetheless we are working on putting the information together to allow users to change this.

Regards,
Jon

Are there any updates on this topic? In the nano’s pinmux spreadsheet, only initial state can be configured, but is there a way to change it’s internal pull up/down resistor?