6 min read7 views

ESP32-S3 Strapping Pins: The Four GPIOs That Decide How Your Board Boots

GPIO0, GPIO3, GPIO45 and GPIO46 are sampled at reset and set the boot mode, the flash supply voltage and the JTAG source. What Espressif's datasheet says, and the board mistakes it rules out.

Felix S. Pavel

Founder & Lead Architect

TL;DR: the ESP32-S3 reads four pins the moment it comes out of reset: GPIO0, GPIO3, GPIO45 and GPIO46. Their levels choose whether the chip runs your firmware or waits for a download, what voltage the flash and PSRAM get, and where JTAG comes from. Anything else wired to those pins has to leave them at the right level for at least 3 ms after CHIP_PU goes high.

This is written for hardware engineers putting an ESP32-S3 chip or WROOM-1 module on their own board. Everything below comes from Espressif's ESP32-S3 Series Datasheet v2.2 (Section 3, Boot Configurations, pages 32 to 35) and the ESP32-S3-WROOM-1 / WROOM-1U Datasheet v1.8. Where a point is our reading of what the documents state, it says so.

What a strapping pin is

The original ESP32 uses a different set (GPIO0, GPIO2, MTDI, MTDO and GPIO5); its best-known trap, an SD card pull-up on MTDI, is covered in 4 Silent Datasheet Traps. This post is about the S3 only.

Each strapping pin has a latch. In the datasheet's words, the latches sample the pins "at Chip Reset" and keep the values until the chip is powered down. After reset the pins are ordinary GPIOs again. So a strapping pin is not reserved: you can use it. You just have to make sure that whatever you connect does not pull it the wrong way during the sampling window.

If nothing drives a pin, its internal weak pull resistor sets the default. Table 3-1 lists them:

PinSelectsDefaultLevels
GPIO0Boot mode (with GPIO46)Weak pull-up, reads 11 = SPI boot (run from flash). 0, with GPIO46 = 0, = joint download boot
GPIO46Boot mode (with GPIO0) and ROM message printingWeak pull-down, reads 0Any value for SPI boot; must be 0 for download boot
GPIO45VDD_SPI voltage (flash and PSRAM supply)Weak pull-down, reads 0With EFUSE_VDD_SPI_FORCE = 0: 0 = 3.3 V, 1 = 1.8 V
GPIO3JTAG signal sourceFloating, no internal pullOnly counts once EFUSE_STRAP_JTAG_SEL is burnt: 1 = USB Serial/JTAG, 0 = JTAG pins

ESP32-S3 Series Datasheet v2.2: Table 3-1 (defaults, page 32), Table 3-3 (boot mode, page 33), Table 3-4 (VDD_SPI, page 34), Table 3-5 (JTAG source, page 35).

The timing window

Table 3-2 gives two numbers. The setup time tSU (minimum 0 ms) is the time the power rails need to settle before CHIP_PU is pulled high. The hold time tH (minimum 3 ms) is how long the chip keeps reading the strapping pins after CHIP_PU is high, before they become normal IO. During those 3 ms the levels must be the ones you intend.

Boot mode: GPIO0 and GPIO46

Table 3-3 has two rows. SPI boot (run the firmware in flash) needs GPIO0 = 1; GPIO46 can be anything. Joint download boot needs GPIO0 = 0 and GPIO46 = 0. That mode covers USB-Serial-JTAG download, USB-OTG download and UART download. The datasheet also mentions an SPI download boot mode and sends you to the Technical Reference Manual for it.

With the defaults (GPIO0 pulled up, GPIO46 pulled down) the chip runs from flash. The classic BOOT button simply shorts GPIO0 to ground while you reset.

Flash voltage: GPIO45

VDD_SPI powers the SPI flash and PSRAM. While the eFuse EFUSE_VDD_SPI_FORCE is 0 (its default), GPIO45 decides: 0 gives 3.3 V from VDD3P3_RTC, 1 gives 1.8 V from the internal flash regulator. Once EFUSE_VDD_SPI_FORCE is burnt to 1, GPIO45 is ignored and EFUSE_VDD_SPI_TIEH sets the voltage instead. eFuses are one-time programmable: the datasheet notes that once programmed to 1, a bit "can never be reverted to 0".

The WROOM-1 datasheet adds a module-level detail. On modules with PSRAM, VDD_SPI is fixed by eFuse, so GPIO45 does not change it. For the other modules it asks you to make sure GPIO45 is not pulled high at power-up.

JTAG source: GPIO3

GPIO3 is different from the other three: it has no internal pull at all, and the datasheet says its level must come from an external circuit that is not high-impedance. It only matters after EFUSE_STRAP_JTAG_SEL has been burnt. With every JTAG eFuse at its default of 0, Table 3-5 shows GPIO3 ignored and JTAG on the USB Serial/JTAG controller.

Board mistakes these rules rule out

  1. A pull-down or a driven-low line on GPIO0. With GPIO46 at its default 0, a low GPIO0 at reset puts the chip in download mode, and the firmware never starts. (Our reading of Tables 3-1 and 3-3.) Peripherals that pull lines low at power-up, such as some open-drain outputs or a sensor's interrupt line, belong on another pin.
  2. Anything that lifts GPIO45 at power-up on a chip or a module without PSRAM. That selects 1.8 V for VDD_SPI, which does not suit 3.3 V flash. (The mechanism is in Table 3-4; the warning is in the WROOM-1 schematic notes.)
  3. A floating GPIO3 after the JTAG-select eFuse is burnt. The datasheet requires a defined external level; leaving it open leaves the JTAG source undefined. (Stated requirement; the consequence is our reading.)
  4. Slow or late signals on any strapping pin. A level shifter, an LED driver or a host MCU that is still starting up must hold the intended level for the full 3 ms hold time. (Stated timing; the examples are ours.)
  5. Re-using IO35, IO36 and IO37 on octal-PSRAM modules. Not a strapping issue, but it sits right next to one: the WROOM-1 datasheet says these pins connect to the Octal SPI PSRAM and are "not available for other uses".

A short review checklist

  • GPIO0: nothing pulls or drives it low at reset except the BOOT button.
  • GPIO46: low or floating at reset if you need download mode; check what else connects to it.
  • GPIO45: low or floating at reset unless you really want 1.8 V VDD_SPI, or you are on a PSRAM module.
  • GPIO3: driven to a defined level if your production flow burns EFUSE_STRAP_JTAG_SEL.
  • Every circuit on these four pins: settled for 3 ms after CHIP_PU rises.

What the datasheet does not cover

GPIO46 is also the strapping pin for ROM message printing, together with two eFuses. The datasheet lists the possible outputs (UART0 and the USB Serial/JTAG controller by default) but leaves the levels and register settings to the Technical Reference Manual, chapter Chip Boot Control. We have not reproduced them here. Check the TRM if your design depends on a silent boot.

These are exactly the kind of facts that get lost when a pin table is retyped: a pin that is "just a GPIO" in the schematic symbol, but decides the boot mode in the silicon. In DatasheetVend, the pin-caution rulebook has a Reset & Boot family that includes strap-latch and strap-resistor rules, each tied to the datasheet page it came from. Review them against the datasheet before you sign off a schematic.

FAQ

Can I use the ESP32-S3 strapping pins as normal GPIOs?

Yes. After reset the latched values are kept and the pins work as regular IO. Only the level during reset and the 3 ms hold time matters.

Why does my ESP32-S3 board start in download mode?

GPIO0 read 0 at reset while GPIO46 read 0. Look for anything holding GPIO0 low during power-up.

What sets the flash voltage on an ESP32-S3?

GPIO45 at reset, unless EFUSE_VDD_SPI_FORCE is burnt; then EFUSE_VDD_SPI_TIEH sets it. On WROOM-1 modules with PSRAM it is fixed by eFuse.

Read the boot pins before the board does.

A new account gets five free passes. Each pass runs up to two modules, pinout and footprint included, on a PDF up to 25 MB.

Sources

  1. Espressif, ESP32-S3 Series Datasheet v2.2, Section 3 Boot Configurations, Tables 3-1 to 3-5, pages 32-35
  2. Espressif, ESP32-S3-WROOM-1 & WROOM-1U Datasheet v1.8, Section 4 Boot Configurations and schematic notes

Was this useful?

A like tells other engineers it is worth their time.

Keep reading

All articles

Cookies. Strictly necessary cookies keep you signed in and remember this choice. Optional analytics (Google, Microsoft, PostHog) show us how the site is used. Cookie details