Internal Pull-ups don't work on GPIO25 or GPIO32
Posted: Sun Sep 20, 2020 11:23 pm
I'm programming a custom ESP32 board using Arduino where GPIO25 and GPIO32 are connected to pogo pins via <10mm traces and to nothing else. The goal is to poll for a short between them as part of an alignment procedure - pretty straightforward.
The issue is, pinMode(X, INPUT_PULLUP) does not actully turn on the pullup for either pin; the ADC readings are always floating. Whichever pin I'm using still successfully detects a short when intended, but because It is floating and never pulled high, it causes a lot of false flags. Code below:
I'm using Node32S as my board with the latest IDF (1.0.4) and latest Arduino (1.8.13). So far, the best answer I've found is that EMI may be overcoming the internal resistors, but I find that hard to believe. Any help is greatly appreciated.
The issue is, pinMode(X, INPUT_PULLUP) does not actully turn on the pullup for either pin; the ADC readings are always floating. Whichever pin I'm using still successfully detects a short when intended, but because It is floating and never pulled high, it causes a lot of false flags. Code below:
Code: Select all
int foo=9999;
pinMode(25, OUTPUT);
digitalWrite(25,HIGH);
pinMode(32,INPUT_PULLUP);
while(foo>0){
foo=analogRead(32);
Serial.println(foo);
//do other stuff
}