Page 1 of 1

Pullup/down not avail on some pins? are 'straps' permanent?

Posted: Sat Nov 12, 2016 1:47 am
by ladyada
helu! its my first hour with the esp32 devkitc, but have some Qs already

on the esp32 datasheet pg 28, it says "each digital gpio can be configd with pullups or pulldowns"
There are several kinds of GPIOs: digital only GPIOs, analog enabled GPIOs, capacitive touch enabled GPIOs, etc.
Analog enabled GPIOs can be configured as digital GPIOs. Capacitive touch enabled GPIOs can be configured
as digital GPIOs.
Each digital enabled GPIO can be configured to internal pull-up or pull-down, or set to high impedance.
using the arduino esp32 build, i've tested all pins and found the following work with INPUT_PULLUP: 14, 16, 17, 18, 19, 21, 22, 23 as expected

but these do not: 13, 25, 26, 27, 32, 33 . Overall pin output/input mode capability is working. i noted all are ADC-capable pins (but pin 14 is ADC too and does work??)

relatedly, the pins with 'straps': 0, 2, 4, 5, 12, 15 also don't seem to have the ability to disable/change the pullup/down. the datasheets sort of implies that the way strapping is done is by activating the default pd/pu on boot (esp_chip_pin_list.pdf pg 4) but it seems more like the 'straps' are not just default activation of the optional pu/pd but actual 'permanent resistors'.

Q. can someone please clarify/verify that not all pins have pullup capability? also, that the 'straps' are non-configurable?

thx!

Re: Pullup/down not avail on some pins? are 'straps' permanent?

Posted: Mon Nov 14, 2016 1:04 am
by ESP_Sprite
It's a silicon bug. We found out about this recently as well. A workaround is to use the RTC GPIO pullups/pulldowns instead; we will put that in esp-idf (as well as document the bug) ASAP.

Re: Pullup/down not avail on some pins? are 'straps' permanent?

Posted: Mon Nov 14, 2016 4:20 am
by ladyada
k thanks for the clarifications! i will design hardware with this v of silicon in mind & let customers know if they run across it.

if/when the RTC workaround is done, it'd be great if you can reply to this thread - that will remind me to integrate it into the Arduino core :D

Re: Pullup/down not avail on some pins? are 'straps' permanent?

Posted: Mon Nov 14, 2016 6:17 am
by ESP_Sprite
Sure, I will. Fyi, I estimate a fix is going to go into esp-idf this week.

Re: Pullup/down not avail on some pins? are 'straps' permanent?

Posted: Wed Nov 16, 2016 2:26 am
by ESP_Sprite
Fixed here: https://github.com/espressif/esp-idf/co ... 1f0b413ac4 (That commit already is in master, by the way, if you update esp-idf you should get the fixed code.)

Re: Pullup/down not avail on some pins? are 'straps' permanent?

Posted: Mon Dec 11, 2017 11:40 pm
by dmaxben
Has anyone had any luck getting the internal pullup working on GPIO 2?

In Arduino, if I use:

pinMode(2, INPUT_PULLUP);

and then print the ADC reading of GPIO 2, its obvious that the pullup isnt working.

Thoughts?

Re: Pullup/down not avail on some pins? are 'straps' permanent?

Posted: Tue Dec 12, 2017 12:20 am
by ESP_Sprite
What hardware are you using? Are you 100% sure there's no external, lower-value, pull-up/down messing with your readings?