Is GPIO13 a strapping pin with pulldown?

zliudr
Posts: 357
Joined: Thu Oct 03, 2019 5:15 am

Is GPIO13 a strapping pin with pulldown?

Postby zliudr » Tue Mar 21, 2023 5:20 am

I know the strapping pins don't include GPIO13 but lately I've encountered an issue with GPIO13 "leaking" voltage. So I did this experiment:
I connected a 10K resistor between GPIO13 and 3.3V. I then monitor the voltage between GPIO13 and GND. If there isn't any pulldown resistors, I should just read 3.3V all the time. But if there is a pulldown resistor (around 17K), then I get about 2.5V with the 10K/17K divider. So regardless what firmware I loaded, blank arduino sketch or a 1.17 version of SPIRAM-enabled micropython, as soon as I let go of the reset button, my reading goes from 3.3V to 2.5V, indicating at boot a pulldown resistor is enabled.

I tested this on a dev board and my own design. The "leaking" of GPIO13 on my own board caused an LED to turn on dimly. So, I wonder, if GPIO13 is some undocumented strapping pin with pulldown at boot. I've used GPIO13 as a TX pin for years with no issues.

boarchuz
Posts: 559
Joined: Tue Aug 21, 2018 5:28 am

Re: Is GPIO13 a strapping pin with pulldown?

Postby boarchuz » Tue Mar 21, 2023 5:50 am

Yes, it has the pulldown enabled. It's not undocumented though, see table "A.4. IO_MUX" in the datasheet for all pin configurations at/after reset.

zliudr
Posts: 357
Joined: Thu Oct 03, 2019 5:15 am

Re: Is GPIO13 a strapping pin with pulldown?

Postby zliudr » Tue Mar 21, 2023 4:28 pm

Thanks. I first read an esp32 datasheet I saved from 2020 and GPIO13 was said to have ie=1(input mode) after reset without mentioning wpd (internal pull-down). But then I downloaded the latest datasheet and confirmed that it was the case, just like you said. I wonder if this was added to the data sheet although the fact has been around in many esp32 hardware revisions. Because my dev board was purchased at least 5 years ago, when the WROVER with SPIRAM was just coming out, I can't imagine that they only recently implemented such pull-down scenarios. You can see that many of the pins have PU or PD enabled at boot. I picked the 4 that are supposed to have pulldowns and measured them across a 10K resistor. I got 2.5V, so I confirmed those. I wonder why so many pins have such after-reset PU/PD features. What if I am driving relays with these pins and having say pull down could affect the relays before my app starts and properly sets the pins?

Who is online

Users browsing this forum: No registered users and 112 guests