Skip to content

Strapping Pins

M Hightower edited this page Aug 29, 2022 · 8 revisions

Strapping Pins

Pins that are used to represent jumpers or straps. Their state is latched at reset.

The following text was about the ESP32 and has been adapted to the ESP8266. I found little to no documentation on this subject for the ESP8266. (Adapted from https://www.esp32.com/viewtopic.php?t=5970 for the ESP8266.)

ESP8266 has 3 strapping pins:

  • GPIO2: internal pull-up
  • GPIO0: internal pull-up
  • GPIO15: internal pull-up, usually has board-level 10-12K pull-down

The above pins are listed in the order of least to highest bit in the GPIO_STRAPPING field. On reset, these bits are shown in the boot message as boot mode:(GPIO_STAPPING, ?).

 ets Jan  8 2013,rst cause:2, boot mode:(1,6)

RO Register GPIO_IN, 0x60000318, holds GPIO_IN_DATA [15:0] and GPIO_STRAPPING [31:16]. The values of the lower three pins of GPIO_STRAPPING are matched up with the above list. 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. 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 if paired with an MCU, the host MCU’s GPIOs control the voltage level of these pins when powering on ESP8266. After reset, the strapping pins work as the normal function pins.

Clone this wiki locally