There’s a bit of fuss going on regarding GPIO pin problems on the RP2350 and I wanted to know if I’d basically bought a set of ‘brick’ boards or, as I suspected, is this actually a pretty specific issue which might not affect the casual/hobby user.
I tried to reproduce the now infamous RP2350 GPIO latching problem and I think I succeeded first time.
I just thought of the simplest scenario to use a pin with a pull down being fed with 3V3, so I used a push button wired to 3V3. I wouldn’t normally do that, I’d use a pull up and wire the push button to GND. Which, by the way, works perfectly on the RP2350.
[Just change the test to use a pull up on pin 1 and wire the push button to GND, of course then 1 is not pressed, 0 is pressed, you don’t need the output pin line at all.]
Here’s my micropython latch test:
from machine import Pin
import time
while True:
but1=Pin(1,Pin.IN,Pin.PULL_DOWN)
print(but1.value(), end="\b")
time.sleep(0.1)
#but1=Pin(1,Pin.OUT) #uncomment to get it working!
It shows the state of a push button wried to GPIO Pin 1 being set to 3V3 when the button is pressed.
If you try it, it’ll show 0 until you press the button, then it gets stuck and latched at 1, even when the button isn’t pressed.
If you uncomment the last line, it’ll all start working, zeroes and ones, just as you’d expect.
Am I being completely simplistic with unlatching the pin by reconfiguring it as an output and then again setting it as an input? It works for me.
As a side note I already successfully tried all the I2C GPIO pin SDA/SCL ‘pairs’ (except for pin 47, as it’s PSRAM chip select on the Pimoroni PGA2350 I’m using - I didn’t cut the trace). So there’s apparently no problem using I2C on the RP2350B (and my soldering skills are working for all the pins). I’m not sure if the I2C device itself has pull-up resistors, or if the pull-ups on the RP2350 pins are working correctly in this case.
I haven’t tried any SPI devices yet, I’m not sure about pull up/down requirements on SPI pins.
Analogue pins might have a problem, but I’m really not bothered about analogue values for my stuff. If I do need them, and it doesn’t work reliably, I’ll just use an I/O expander as a workaround.
Any thoughts, anyone?