ESP32 strapping pins explained for every chip variant: ESP32, S2, S3, C3, C6, H2. Complete GPIO boot mode table, safe pin selection guide, pins to avoid, and configuration tips.

ESP32 Strapping Pins: Complete List for All Chip Variants

ESP32 strapping pins explained for every chip variant: ESP32, S2, S3, C3, C6, H2. Complete GPIO boot mode table, safe pin selection guide, pins to avoid, and configuration tips.

Getting Started
Last Updated:

Strapping pins are fundamental to all ESP32 microcontrollers, including the original ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2. Today we are going to explore the strapping pins common features and functions across different ESP32 versions.

ChipStrapping pinsDownload mode triggerWhat they set
ESP32GPIO0, GPIO2, GPIO5, GPIO12 (MTDI), GPIO15 (MTDO)GPIO0 LOW + GPIO2 LOWBoot mode, flash voltage, ROM log, SDIO timing
ESP32-S2GPIO0, GPIO45, GPIO46GPIO0 LOW + GPIO46 LOWBoot mode, flash voltage, ROM log
ESP32-S3GPIO0, GPIO3, GPIO45, GPIO46GPIO0 LOW + GPIO46 LOWBoot mode, flash voltage, ROM log, JTAG source
ESP32-C3GPIO2, GPIO8, GPIO9GPIO9 LOW + GPIO8 HIGHBoot mode, ROM log
ESP32-C6GPIO4 (MTMS), GPIO5 (MTDI), GPIO8, GPIO9, GPIO15GPIO9 LOW + GPIO8 HIGHBoot mode, ROM log, SDIO timing, JTAG source
ESP32-H2GPIO8, GPIO9, GPIO25GPIO9 LOW + GPIO8 HIGHBoot mode, ROM log, JTAG source

GPIO2 on the ESP32 and GPIO46 on the S2 and S3 already sit LOW by default (internal pull-down), so on most boards holding GPIO0 or GPIO9 LOW through a reset is all it takes.

Want this offline? View the full cheatsheet (PNG)

Main Uses of Strapping Pins #

The strapping pins on ESP32 microcontrollers control these four key functions:

Understanding Strapping Pins

Strapping pins (also called bootstrap pins) are specialized GPIO pins that the ESP32 reads during boot to determine hardware configuration. During power-on or reset, the chip samples these pins and latches the values to configure:

  • Boot source - Flash memory, or a download mode over UART, USB or SDIO
  • Flash voltage - 3.3V or 1.8V for SPI communication (ESP32, S2 and S3 only)
  • Debug routing - USB-JTAG or pad-based JTAG (S3, C6 and H2)
  • ROM messages - Enable or disable boot log output

Location of strapping pins on an ESP32 microcontroller

The sampling happens only once during reset: Espressif's datasheets give a hold time of at least 1 ms (ESP32) or 3 ms (the newer chips) after the chip is enabled. After that, these pins become regular GPIOs - but external components (resistors, LEDs, sensors) remain connected, so circuit design must ensure correct boot states.

Automatic Boot Mode on Modern Boards #

Most ESP32 development boards manufactured since 2018 include automatic boot mode switching using DTR/RTS signals from the USB-to-serial chip, eliminating the need to manually press BOOT and RESET buttons.

How it works: When uploading firmware, the programming software (Arduino IDE, PlatformIO, esptool) automatically:

  1. Controls the boot pin and RESET through transistors
  2. Pulls the boot pin LOW while resetting to enter download mode
  3. Uploads firmware via UART
  4. Releases the boot pin and resets again to run your program

Automatic Boot Mode

  • ESP32-DevKitC V4 (Espressif official)
  • NodeMCU-32S, WROOM-32 dev boards
  • Boards with CP2102, CH340G, FT232 chips
  • ESP32-S2/S3/C3 with native USB

Manual Buttons Required

  • Bare ESP32 modules without dev board PCB
  • Custom PCBs without auto-reset circuit
  • Budget boards with simplified USB
  • Basic USB-to-TTL adapters (no DTR/RTS)

Why strapping pins matter:

  • Boot failures - Incorrect pin states are the #1 cause of "won't boot" errors. External components on wrong pins prevent startup. You can probe the pin voltage with a multimeter to confirm its state at boot.
  • Firmware uploads - The boot pin must be LOW at reset to flash new code. Circuits holding it HIGH block uploads.
  • Circuit design - Use series resistors (1k-10k ohm) when connecting peripherals to strapping pins to avoid boot interference.
  • Pin planning - Prioritize non-strapping pins for critical hardware. Save strapping pins for non-essential features.

Which GPIO Pins Are Strapping Pins? Complete List by ESP32 Version #

Here's the complete list of strapping pins for each ESP32 version, with the level each one sits at when nothing is connected and the boot mode table from Espressif's datasheet:

ESP32 (Original) Strapping Pins5 pins
PinDefaultWhat it sets
GPIO0Pull-up (HIGH)Boot mode
GPIO2Pull-down (LOW)Boot mode: must be LOW or floating to enter download mode
GPIO5Pull-up (HIGH)SDIO slave timing, together with MTDO
GPIO12 (MTDI)Pull-down (LOW)Flash voltage (VDD_SDIO): LOW = 3.3 V, HIGH = 1.8 V
GPIO15 (MTDO)Pull-up (HIGH)ROM log on U0TXD: LOW silences it; also SDIO slave timing
Boot modeGPIO0GPIO2
SPI flash boot (normal)HIGHAny
Download boot (UART, SDIO)LOWLOW

The original ESP32 has no JTAG strapping pin: JTAG can only be turned off for good with the EFUSE_DISABLE_JTAG eFuse.

ESP32-S2 Strapping Pins3 pins
PinDefaultWhat it sets
GPIO0Weak pull-up (HIGH)Boot mode
GPIO45Weak pull-down (LOW)Flash voltage (VDD_SPI): LOW = 3.3 V, HIGH = 1.8 V
GPIO46Weak pull-down (LOW)Boot mode, ROM log
Boot modeGPIO0GPIO46
SPI flash boot (normal)HIGHAny
Download boot (USB-OTG, UART, SPI)LOWLOW
ESP32-S3 Strapping Pins4 pins
PinDefaultWhat it sets
GPIO0Weak pull-up (HIGH)Boot mode
GPIO3Floating (no internal pull)JTAG signal source, only once an eFuse enables it
GPIO45Weak pull-down (LOW)Flash voltage (VDD_SPI): LOW = 3.3 V, HIGH = 1.8 V
GPIO46Weak pull-down (LOW)Boot mode, ROM log
Boot modeGPIO0GPIO46
SPI flash boot (normal)HIGHAny
Download boot (USB-Serial-JTAG, USB-OTG, UART)LOWLOW
ESP32-C3 Strapping Pins3 pins
PinDefaultWhat it sets
GPIO2FloatingNot the boot mode itself, but Espressif recommends pulling it HIGH against glitches
GPIO8FloatingMust be HIGH to enter download mode; also the ROM log
GPIO9Weak pull-up (HIGH)Boot mode
Boot modeGPIO2GPIO8GPIO9
SPI flash boot (normal)AnyAnyHIGH
Download boot (USB-Serial-JTAG, UART)HIGHHIGHLOW
ESP32-C6 Strapping Pins5 pins
PinDefaultWhat it sets
GPIO4 (MTMS)FloatingSDIO slave sampling and driving clock edge, with MTDI
GPIO5 (MTDI)FloatingSDIO slave sampling and driving clock edge, with MTMS
GPIO8FloatingMust be HIGH to enter download mode; also the ROM log
GPIO9Weak pull-up (HIGH)Boot mode
GPIO15Floating (no internal pull)JTAG signal source, only once an eFuse enables it
Boot modeGPIO8GPIO9
SPI flash boot (normal)AnyHIGH
Download boot (USB-Serial-JTAG, UART, SDIO)HIGHLOW
Invalid - avoidLOWLOW
ESP32-H2 Strapping Pins3 pins
PinDefaultWhat it sets
GPIO8FloatingMust be HIGH to enter download mode; also the ROM log
GPIO9Weak pull-up (HIGH)Boot mode
GPIO25Floating (no internal pull)JTAG signal source, only once an eFuse enables it
Boot modeGPIO8GPIO9
SPI flash boot (normal)AnyHIGH
Download boot (USB-Serial-JTAG, UART)HIGHLOW

Key Observations #

  • The boot pin moved: GPIO0 selects the boot mode on the ESP32, S2 and S3; GPIO9 does on the C3, C6 and H2, where download mode also needs GPIO8 HIGH.
  • Only the ESP32, S2 and S3 have a flash voltage strap (GPIO12 on the ESP32, GPIO45 on the S2 and S3). The C3, C6 and H2 have none.
  • The JTAG source strap exists only on the S3 (GPIO3), C6 (GPIO15) and H2 (GPIO25), and the chip ignores it until an eFuse is burnt.
  • The newer chips float by default: on the C3, C6 and H2 every strapping pin except GPIO9 has no internal pull, so give the ones that matter a defined level.

Common Strapping Features Across ESP32 Versions #

Strapping pins control four main hardware configurations across ESP32 variants. Here's a detailed look at each function:

Boot Mode Selection #

Determines whether the ESP32 boots into normal operation mode (to run your program) or download mode (to receive new firmware via USB/UART).

Why it's important: This is the most critical strapping pin function. Without proper boot mode control, you cannot upload firmware to your ESP32. Every time you flash new code, the chip must enter download mode first, then reset to normal mode to run the code.

ChipsNormal bootDownload mode
ESP32GPIO0 HIGH (default)GPIO0 LOW, GPIO2 LOW (default)
ESP32-S2, ESP32-S3GPIO0 HIGH (default)GPIO0 LOW, GPIO46 LOW (default)
ESP32-C3, ESP32-C6, ESP32-H2GPIO9 HIGH (default)GPIO9 LOW, GPIO8 HIGH

Most dev boards put their "BOOT" button on the boot pin: GPIO0 on ESP32, S2 and S3 boards, GPIO9 on C3, C6 and H2 boards.

Flash Voltage Selection (VDD_SDIO / VDD_SPI)

Configures the operating voltage (1.8V or 3.3V) for the SPI flash memory chip that stores your program code and data. Some ESP32 modules support both voltage levels.

Why it's important: The voltage must match your flash chip. If the strap selects 1.8 V on a module with 3.3 V flash, the flash is underpowered and the chip fails to boot; selecting 3.3 V for 1.8 V flash runs it outside its rating. Most ESP32 modules use 3.3V flash.

ChipStrapping pinDefault1.8 V when
ESP32GPIO12 (MTDI), sets VDD_SDIOPull-down: 3.3 VGPIO12 is HIGH at reset
ESP32-S2, ESP32-S3GPIO45, sets VDD_SPIPull-down: 3.3 VGPIO45 is HIGH at reset

An eFuse can override the pin for good: EFUSE_SDIO_FORCE with EFUSE_SDIO_TIEH on the ESP32, EFUSE_VDD_SPI_FORCE with EFUSE_VDD_SPI_TIEH on the S2 and S3. Once it is burnt, the pin's level at reset no longer matters. The C3, C6 and H2 have no flash voltage strapping pin.

On the original ESP32, MTDO (GPIO15) and GPIO5 also set the SDIO slave timing (which clock edge it samples and drives on), and the C6 does the same with MTMS (GPIO4) and MTDI (GPIO5). That only matters if the chip is an SDIO slave to a host processor.

JTAG Signal Source Control #

Determines whether JTAG debugging signals come from USB (built-in USB Serial/JTAG controller) or external debug pins (traditional JTAG pads). JTAG allows real-time debugging, breakpoints, and memory inspection.

Why it's important: Proper JTAG configuration is essential for advanced debugging with tools like OpenOCD or ESP-IDF's debugging features. It determines whether you debug via USB cable or external JTAG hardware (like J-Link or FT2232H).

Out of the box the S3, C6 and H2 use the USB Serial/JTAG controller and ignore their JTAG strapping pin. The pin only takes over after you burn the JTAG select eFuse (EFUSE_STRAP_JTAG_SEL on the S3, EFUSE_JTAG_SEL_ENABLE on the C6 and H2):

ChipStrapping pinPin HIGHPin LOW
ESP32-S3GPIO3USB Serial/JTAG controllerJTAG pins
ESP32-C6GPIO15USB Serial/JTAG controllerJTAG pins
ESP32-H2GPIO25USB Serial/JTAG controllerJTAG pins

These pins have no internal pull resistor, so once the eFuse is burnt your circuit has to drive the level: a floating pin is not allowed. The ESP32, S2 and C3 have no JTAG strapping pin at all.

Note: The EFUSE_DIS_PAD_JTAG and EFUSE_DIS_USB_JTAG eFuses can permanently disable either JTAG source for security, and then the strapping pin is ignored.

JTAG Pin Name Aliases (MTDI, MTDO, MTCK, MTMS)

ESP32 datasheets and pinout diagrams use legacy JTAG signal names alongside GPIO numbers. These aliases appear frequently in IDE warnings and community discussions, and they sit on different GPIOs on each chip:

AliasJTAG signalESP32ESP32-S2, S3ESP32-C3, C6ESP32-H2
MTDITDI (Test Data In)GPIO12GPIO41GPIO5GPIO5
MTDOTDO (Test Data Out)GPIO15GPIO40GPIO7GPIO3
MTCKTCK (Test Clock)GPIO13GPIO39GPIO6GPIO4
MTMSTMS (Test Mode Select)GPIO14GPIO42GPIO4GPIO2

Three of them are also strapping pins: MTDI and MTDO on the original ESP32 (flash voltage, and ROM log plus SDIO timing), and MTMS and MTDI on the C6 (SDIO timing).

ROM Boot Messages

Controls whether the ESP32's ROM bootloader prints diagnostic messages during the boot process. These messages show boot mode, flash configuration, and any boot errors.

Why it's important: ROM messages are extremely useful for debugging boot failures, but you may want to disable them in production devices to reduce power consumption, boot time, or prevent information leakage.

ChipStrapping pinHow it works
ESP32GPIO15 (MTDO)HIGH (default) prints the log on U0TXD, LOW silences it
ESP32-S2, ESP32-S3GPIO46Ignored until EFUSE_UART_PRINT_CONTROL is burnt; the eFuse value then picks which level silences the log
ESP32-C3, ESP32-C6, ESP32-H2GPIO8Same scheme as the S2 and S3, with GPIO8

When enabled:

  • See detailed boot sequence messages
  • Flash size, speed, and mode information
  • Error messages if boot fails
  • Helps diagnose hardware or flash configuration problems

When disabled:

  • Cleaner serial output (only your application's messages)
  • Slightly faster boot time
  • Prevents exposing internal boot information
  • Preferred for production/commercial devices

Output destinations: The original ESP32 prints to UART0. The S2 prints to UART0 or UART1 (set by an eFuse). The S3, C3, C6 and H2 print to UART0 and the USB Serial/JTAG controller by default, and each can be turned off with eFuses.

Using Strapping Pins as Regular GPIO #

While strapping pins primarily serve as configuration parameters during the boot process, this doesn't mean the pins must be left alone after the initial configuration.

Once the ESP32 microcontroller has successfully initialized, these pins transform into regular GPIO (General Purpose Input/Output) pins, available for user-defined functions. However, you must be careful when manipulating these pins during and immediately after the boot phase.

Can you use strapping pins as regular GPIOs? Yes, but with important caveats:

Safe After Boot

  • Read input from sensors
  • Control LEDs or outputs
  • Use for communication protocols (I2C, SPI)
  • Any normal GPIO function

Watch Out For

  • External pull-ups/downs affecting boot state
  • Components that hold pins LOW/HIGH at boot
  • Reset scenarios that re-check strapping pins
  • Brownout conditions triggering re-boot

Design considerations:

  • Use series resistors (1k-10k ohm) when connecting peripherals to strapping pins. This allows the internal pull-ups/downs to dominate during boot.
  • Avoid strong pull-ups/downs that could override the ESP32's boot configuration.
  • Test your design through multiple power cycles and resets to ensure consistent booting.
  • Prioritize non-strapping pins for critical functions when possible.

Can I Use GPIO0, GPIO2, or GPIO12 as Output After Boot?

Yes - all strapping pins become fully general-purpose GPIOs once the chip has latched them, a few milliseconds after reset. Here's the practical guidance for the three pins people ask about most on the original ESP32:

PinAfter bootWhat to watch at reset
GPIO0Safe for input and outputMust not be held LOW at reset, or the chip enters download mode. Most boards already pull it HIGH and put the BOOT button on it; use a 1k-10k ohm series resistor for a button or LED.
GPIO2Safe for output (often the on-board LED)Doesn't matter for a normal boot, but must be LOW or floating to enter download mode. A pull-up, or a circuit that drives it HIGH at reset, is what breaks flashing.
GPIO12 (MTDI)Use with cautionThe most dangerous strapping pin: HIGH at reset selects 1.8 V flash, and a module with 3.3 V flash then fails to boot. Keep it floating or LOW, or burn the flash voltage eFuse with espefuse set-flash-voltage 3.3V so its level no longer matters.

ESPHome Strapping Pin Warnings

ESPHome checks your pins when it validates a config and prints this for any strapping pin of your chip:

WARNING GPIO2 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq/#why-am-i-getting-a-warning-about-strapping-pins

The warning is informational - it does not mean the pin doesn't work. It fires for the same pins this guide lists (GPIO0, 2, 5, 12 and 15 on the original ESP32). The Arduino core and plain ESP-IDF print no such warning, so on those you have to know the pins yourself.

Once you have checked the circuit on that pin, silence the warning per pin with ignore_strapping_warning:

binary_sensor:
- platform: gpio
pin:
number: GPIO5
ignore_strapping_warning: true
name: "Door"
  • For GPIO5: safe to use after boot - suppress the warning if it's distracting
  • For GPIO12: verify your module uses 3.3 V flash before driving it HIGH at reset
  • For GPIO0: ensure nothing holds it LOW during power-on

ESP32 GPIO Pins to Avoid: Safe Pin Selection Guide

To revise once more, let's take a look at the strapping pins on different ESP32 versions. Strapping pins are used to set configurations such as ESP32 programming mode or specific boot behaviors.

It's important to identify ESP32 reserved pins and avoid using them as GPIO pins, as they are required during boot-up and certain operational modes. The table below provides an overview of ESP32 programming pins and ESP32 pins to avoid.

ESP32 versionStrapping pins to avoid
ESP32GPIO0, GPIO2, GPIO5, GPIO12 (MTDI), GPIO15 (MTDO)
ESP32-S2GPIO0, GPIO45, GPIO46
ESP32-S3GPIO0, GPIO3, GPIO45, GPIO46
ESP32-C3GPIO2, GPIO8, GPIO9
ESP32-C6GPIO4 (MTMS), GPIO5 (MTDI), GPIO8, GPIO9, GPIO15
ESP32-H2GPIO8, GPIO9, GPIO25
ESP32 Strapping Pins CheatsheetPNG

ESP8266 Strapping Pins #

While this guide focuses on the ESP32 family, the ESP8266 uses a similar strapping pin concept at boot. If you're working with an ESP8266 (e.g., NodeMCU, Wemos D1 Mini), here are its three boot-critical pins:

PinRequired state at bootEffect
GPIO0HIGH = normal boot, LOW = download modePrimary boot mode control - same role as on ESP32
GPIO2HIGH (internal pull-up)Must be HIGH at boot - LOW causes boot failure. Don't tie it straight to VCC: the bootloader drives it as an output. Also TXD1 (second UART TX).
GPIO15LOW (external pull-down on most modules)Must be LOW at boot - HIGH causes boot failure. Also SPI CS / HSPI CS0.

Additional Resources #

The boot configuration chapter (Section 3) of each datasheet is the source for every table above.

Frequently asked questions

19 questions

What are strapping pins?

Strapping pins are special GPIO pins that configure the ESP32's behavior during startup. These pins are read during boot to determine settings like boot mode, flash voltage, JTAG source, and ROM message output. The most important one is the boot pin (GPIO0 on ESP32, S2 and S3, GPIO9 on C3, C6 and H2), which controls whether the chip enters normal boot mode or download (flash) mode.

What are the ESP32 strapping pins?

The original ESP32 has 5 strapping pins: GPIO0 (boot mode, internal pull-up), GPIO2 (boot mode, internal pull-down), GPIO5 (SDIO slave timing, pull-up), MTDI/GPIO12 (VDD_SDIO flash voltage, pull-down) and MTDO/GPIO15 (ROM log on U0TXD and SDIO slave timing, pull-up).

What are the ESP32-S3 strapping pins?

ESP32-S3 has 4 strapping pins: GPIO0 (boot mode, weak pull-up), GPIO3 (JTAG signal source, floating, only used once the JTAG select eFuse is burnt), GPIO45 (VDD_SPI flash voltage, weak pull-down) and GPIO46 (boot mode and ROM log, weak pull-down). Download mode needs GPIO0 LOW with GPIO46 LOW, which is its default.

What are the ESP32-C3 strapping pins?

ESP32-C3 has 3 strapping pins: GPIO2 (floating), GPIO8 (floating) and GPIO9 (weak pull-up). GPIO9 selects the boot mode: HIGH runs from flash, LOW enters download mode, which also needs GPIO8 HIGH. GPIO2 does not select the boot mode, but Espressif recommends pulling it up. GPIO8 also controls the ROM log once the EFUSE_UART_PRINT_CONTROL eFuse is burnt.

What are the ESP32-C6 strapping pins?

ESP32-C6 has 5 strapping pins: GPIO4 (MTMS) and GPIO5 (MTDI) set the SDIO slave clock edges, GPIO8 and GPIO9 select the boot mode (GPIO9 LOW with GPIO8 HIGH enters download mode), GPIO8 also controls the ROM log, and GPIO15 selects the JTAG source once the JTAG select eFuse is burnt. GPIO9 has a weak pull-up; the others float by default.

Which ESP32 pin controls boot mode?

GPIO0 controls boot mode on ESP32, ESP32-S2, and ESP32-S3. When GPIO0 is LOW (connected to ground) during reset, the chip enters download/flash mode. When HIGH (its default pull-up), it boots normally. On ESP32-C3, ESP32-C6 and ESP32-H2 the boot pin is GPIO9: LOW at reset with GPIO8 HIGH enters download mode, HIGH (default) runs from flash.

How do I put ESP32 in download mode?

To put ESP32 in download mode: 1) Hold the BOOT button (connects GPIO0 to ground; GPIO9 on ESP32-C3, C6 and H2 boards), 2) Press and release the EN/RST button to reset the chip, 3) Release the BOOT button. The chip will now be in download mode, ready for flashing. Alternatively, connect the boot pin to ground before powering on the ESP32.

What is GPIO0 used for in ESP32?

GPIO0 is the primary boot mode strapping pin on ESP32, ESP32-S2, and ESP32-S3. During boot: GPIO0 LOW = Download/Flash Mode (for uploading firmware), GPIO0 HIGH = Normal Boot Mode (runs existing firmware). After boot completes, GPIO0 can be used as a regular GPIO pin for input/output, but requires careful handling due to its boot function.

What pins should I avoid on ESP32?

Use these carefully on the original ESP32: GPIO0 (boot mode), GPIO2 (must be LOW or floating to enter download mode), GPIO12/MTDI (HIGH at reset selects 1.8 V flash and stops modules with 3.3 V flash from booting), GPIO15/MTDO (silences the boot log when LOW) and GPIO5. Other ESP32 chips have their own strapping pins - check the list for your chip.

What does 'wrong boot mode detected (0x13)' mean?

Error 'wrong boot mode detected (0x13)' means the ESP32 is not in download mode when trying to flash firmware. The chip needs its boot pin (GPIO0, or GPIO9 on ESP32-C3, C6 and H2) pulled LOW during reset to enter download mode. Solutions: 1) Hold BOOT button while pressing EN/RST button, 2) Check the boot pin connection to ground during boot, 3) Verify boot button circuit is working, 4) Try manual boot mode entry sequence.

Can I use strapping pins as regular GPIO?

Yes, strapping pins can be used as regular GPIO after boot completes. However, use them carefully: ensure your circuit doesn't interfere with boot requirements (avoid permanent pull-ups/pull-downs that conflict with boot modes), add external circuitry only after understanding boot state requirements, and consider using non-strapping pins for critical functions to avoid boot issues. GPIO12 requires special care as HIGH state during boot can cause problems.

What is the difference between ESP32 and ESP32-S3 strapping pins?

ESP32 has 5 strapping pins (GPIO0, GPIO2, GPIO5, GPIO12/MTDI, GPIO15/MTDO) while ESP32-S3 has 4 (GPIO0, GPIO3, GPIO45, GPIO46). The flash voltage strap moves from GPIO12 to GPIO45, the ROM log strap moves from GPIO15 to GPIO46 (which also takes GPIO2's place next to GPIO0 for boot mode), and the S3 adds GPIO3 for the JTAG signal source.

What is ESP32 boot mode?

ESP32 boot mode determines how the chip starts up. There are two primary boot modes: 1) Normal Boot Mode (boot pin HIGH) - runs the firmware stored in flash memory, this is the default operating mode; 2) Download/Flash Mode (boot pin LOW) - allows uploading new firmware via serial or USB, used when programming the ESP32. The boot pin is GPIO0 on ESP32, S2 and S3 and GPIO9 on C3, C6 and H2; its state, together with the other strapping pins, is read during chip reset or power-on.

What does GPIO0 mean on ESP32?

GPIO0 is General Purpose Input/Output pin number 0 on ESP32. It serves dual purposes: 1) As a strapping pin during boot - controls whether ESP32 enters download mode (LOW) or normal boot mode (HIGH); 2) As a regular GPIO pin after boot - can be used for input/output in your program. Most ESP32 development boards connect GPIO0 to a BOOT button, allowing easy mode switching. It's the most important pin to understand for ESP32 development.

What is strapping pin meaning?

A strapping pin (also called bootstrap pin or strap pin) is a hardware configuration pin that a microcontroller reads during startup to determine its initial behavior. The term 'strapping' comes from the practice of 'strapping' or connecting these pins to specific voltage levels (HIGH/LOW) to configure the chip. On ESP32, strapping pins configure boot mode, voltage levels, debug interfaces, and other startup parameters by sampling the pin states only during reset or power-on.

Which ESP32 pins to avoid?

Avoid these ESP32 pins for general GPIO use: GPIO0 (boot mode - needs to be HIGH at boot), GPIO2 (must be LOW or floating to enter download mode), GPIO12/MTDI (if HIGH at boot, modules with 3.3 V flash fail to boot), GPIO15/MTDO (outputs ROM debug messages), input-only pins GPIO34-39 (can't drive outputs), and flash pins GPIO6-11 (reserved for SPI flash). For critical applications, use GPIO pins that don't have boot-time functions: GPIO4, GPIO13, GPIO14 and GPIO16-33 are generally safe choices, except that GPIO16 and GPIO17 are taken by PSRAM on WROVER modules.

What are ESP32 flash pins?

ESP32 flash pins (GPIO6-GPIO11) are dedicated pins connected to the external SPI flash memory chip that stores your firmware. These pins include: GPIO6 (CLK), GPIO7 (D0), GPIO8 (D1), GPIO9 (D2), GPIO10 (D3), and GPIO11 (CMD). Never use these pins for other purposes - they are exclusively reserved for communicating with the flash memory. Attempting to use flash pins will cause the ESP32 to malfunction or fail to boot.

What are ESP8266 strapping pins?

The ESP8266 has three boot-critical strapping pins: GPIO0 (HIGH = normal boot, LOW = download mode), GPIO2 (must be HIGH at boot - LOW causes boot failure) and GPIO15 (must be LOW at boot - HIGH causes boot failure). Unlike the ESP32, the ESP8266 is less forgiving: GPIO2 and GPIO15 have no flexibility in their required states. Most ESP8266 dev boards (NodeMCU, Wemos D1 Mini) include the correct pull-up and pull-down resistors on-board.

What does the 'GPIO is a strapping PIN' warning in ESPHome mean?

ESPHome prints 'GPIOx is a strapping PIN and should only be used for I/O with care' when a config uses one of the chip's strapping pins (GPIO0, 2, 5, 12 and 15 on the original ESP32). The pin still works: the warning is a reminder that external pull resistors on it can stop the chip from booting or flashing. Once you have checked the circuit, add ignore_strapping_warning: true to that pin to silence it. The Arduino core and plain ESP-IDF print no such warning.

Conclusion #

In conclusion, strapping pins play an important role in the initialization and configuration of various ESP32 microcontroller versions, including ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2. These pins serve as gatekeepers, influencing critical parameters during startup or reset, such as boot mode, voltage selection, JTAG signal source, and more.

Across different ESP32 versions, certain common strapping pins persist, each with its unique functions and default configurations. GPIO0, for instance, is the most commonly used strapping pin, which is used to select the boot mode on the ESP32, S2 and S3; on the C3, C6 and H2 that job moved to GPIO9.