Strapping Pins explanation

Humam Helfawi
Posts: 19
Joined: Tue May 29, 2018 10:24 pm

Strapping Pins explanation

Postby Humam Helfawi » Mon Jun 04, 2018 7:04 pm

Hi,
In this reference https://cdn.sparkfun.com/datasheets/IoT ... eet_en.pdf at page 16:
Strapping Pins
ESP32 has 6 strapping pins:
• MTDI/GPIO12: internal pull-down
• GPIO0: internal pull-up
• GPIO2: internal pull-down
• GPIO4: internal pull-down
• MTDO/GPIO15: internal pull-up
• GPIO5: internal pull-up
Software can read the value of these 6 bits from the register ”GPIO_STRAPPING”.
During the chip power-on reset, the latches of the strapping pins sample the voltage level as strapping bits of ”0”
or ”1”, and hold these bits until the chip is powered down or shut down. The strapping bits configure the device
boot mode, the operating voltage of VDD_SDIO and other system initial settings.
Each strapping pin is connected with its internal pull-up/pull-down during the chip reset. Consequently, if a strapping
pin is unconnected or the connected external circuit is high-impendence, the internal weak pull-up/pull-down
will determine the default input level of the strapping pins.
To change the strapping bit values, users can apply the external pull-down/pull-up resistances, or apply the host
MCU’s GPIOs to control the voltage level of these pins when powering on ESP32.
After reset, the strapping pins work as the normal functions pins.
Refer to Table 2 for detailed boot modes configuration by strapping pins.
As I could understand, those 6 pins (GPIOs 12, 0, 2, 4, 15, 5), should be left floating or pulled up or down during booting and flashing stages. Is my understanding correct?

Now, I have some peripherals that are connected to one of those pins (GPIO 12 for example). Connecting a specific pin from the peripherals to one of the ESP32 strapping pins (GPIO 12) denies ESP32 from flashing. What should I do in this case? How should I connect those peripherals to those pins so it works well.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Strapping Pins explanation

Postby WiFive » Mon Jun 04, 2018 7:36 pm

0,2, and 12 are the critical ones. A workaround is to put a time delay switch between the gpio and the peripheral so the bootloader can read the strapping pin before the switch connects it to the peripheral.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Strapping Pins explanation

Postby ESP_Angus » Wed Jun 06, 2018 12:18 am

Humam Helfawi wrote: Now, I have some peripherals that are connected to one of those pins (GPIO 12 for example). Connecting a specific pin from the peripherals to one of the ESP32 strapping pins (GPIO 12) denies ESP32 from flashing. What should I do in this case? How should I connect those peripherals to those pins so it works well.
Connecting to the pin by itself is not a problem, but if the connection pulls GPIO12 up on reset then this is a problem for flashing.

There are usually ways to make this work, one is the time delay suggested by WiFive. But it really depends on what the peripheral connected is (as current, speed, etc. requirements vary). Can you elaborate at all?

zandam
Posts: 3
Joined: Sat Jan 05, 2019 2:08 pm

Re: Strapping Pins explanation

Postby zandam » Sat Jan 05, 2019 3:48 pm

WiFive wrote:
Mon Jun 04, 2018 7:36 pm
0,2, and 12 are the critical ones. A workaround is to put a time delay switch between the gpio and the peripheral so the bootloader can read the strapping pin before the switch connects it to the peripheral.
Hello, I'd be interested in this solution. How do you put a "time delay switch"? Is it doable by editing (I don't know how) the bootloader?

stoikos
Posts: 31
Joined: Mon Aug 06, 2018 4:38 am

Re: Strapping Pins explanation

Postby stoikos » Wed Apr 22, 2020 6:46 am

you can use a line buffer like SN74AHC125D tied to the EN via a voltage supervisor like MAX810TTRG

edurmz
Posts: 1
Joined: Sun Aug 23, 2020 8:45 pm

Re: Strapping Pins explanation

Postby edurmz » Sun Aug 23, 2020 8:55 pm

I found another solution for GPIO12. You have to use "espefuse.py set_flash_voltage 3.3V". See descritpion here: https://github.com/espressif/esptool/wiki/espefuse

This seems to be a nice solution. I just received a new bunch of PCBs based on ESP32 and I implemented GPIO12 as RX for ST3485. Transceiver seems to be fast enough to set HIGH GPIO12, preventing ESP-WROOM-32D to boot Flash with 3.3V.

Who is online

Users browsing this forum: No registered users and 116 guests