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

ladyada
Posts: 3
Joined: Tue Dec 22, 2015 3:57 am

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

Postby ladyada » Sat Nov 12, 2016 1:47 am

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!

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Mon Nov 14, 2016 1:04 am

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.

ladyada
Posts: 3
Joined: Tue Dec 22, 2015 3:57 am

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

Postby ladyada » Mon Nov 14, 2016 4:20 am

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

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Mon Nov 14, 2016 6:17 am

Sure, I will. Fyi, I estimate a fix is going to go into esp-idf this week.

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Wed Nov 16, 2016 2:26 am

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.)

dmaxben
Posts: 108
Joined: Thu Nov 16, 2017 6:04 pm

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

Postby dmaxben » Mon Dec 11, 2017 11:40 pm

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?

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Tue Dec 12, 2017 12:20 am

What hardware are you using? Are you 100% sure there's no external, lower-value, pull-up/down messing with your readings?

Who is online

Users browsing this forum: No registered users and 51 guests