pico-feedback
pico-feedback copied to clipboard
RP2350-E9 Erratum: can get "stuck" at 2V state even without pulldown
I'm debugging a CircuitPython issue in which we see input pins stuck at slightly above 2V, even without all the conditions described in the RP2350-E9 erratum. I reproduced the problem in MicroPython as well. https://github.com/adafruit/circuitpython/issues/9541 https://github.com/orgs/micropython/discussions/15621#discussioncomment-10446747
The basic conditions are:
- A pin is set up for GPIO input, with no internal pulls enabled.
- Unconnected, the pin initially reads low.
- If the pin is jumpered high temporarily, and then the jumper is removed, the pin reads high, and remains stuck at some voltage above 2V, as measured with a voltmeter.
- Then connecting the pin to ground with a 1M resistor and waiting for any charge to dissipate does not help. The pin remains stuck at the same voltage and reads as high.
- Jumpering the pin directly to ground clears the "stuck" state and the pin reads low.
- The process can be repeated.
For example, in CircuitPython:
Adafruit CircuitPython 9.2.0-alpha.2351-3-g16b6c8877e-dirty on 2024-08-25; Pimoroni Tiny 2350 with rp2350a
>>> import board, digitalio
>>> gp0 = digitalio.DigitalInOut(board.GP0)
>>> gp0.pull = None # pullups should already be disabled, but make sure
>>> gp0.value # initial state - pin unconnected
False
>>> gp0.value # connect to 3.3V with a 1M resistor
True
>>> gp0.value # Remove resistor: pin reads 2.3V on voltmeter
True
>>> gp0.value # connect via same resistor to ground: pin still reads 2.3V even after many seconds: no bleed-off
True
>>> gp0.value # Connect directly to ground with a jumper
False
>>> gp0.value # Remove jumper
False
I can reproduce the same kind of behavior in MicroPython.
I am at a loss to explain this. It seems like a more general problem than RP2350-E9. I've added some extra code to call gpio_disable_pulls()
even before calling gpio_init()
on the pin, to make sure we are not getting into the E9 state. Am I misunderstanding something about how to deal with pin setup?
The next step would be to reproduce this in pico-sdk, and I'll try that tomorrow.