What Are Strapping Pins? Why Some GPIO Pins Can Stop Your Board From Booting

What Are Strapping Pins? Why Some GPIO Pins Can Stop Your Board From Booting

Published

Updated

Most GPIO pins look simple from the outside. You connect an LED, a button, a sensor, or a module, then write a few lines of code to control it.

But on some development boards, especially ESP32-based boards, a few pins have a second job before your program even starts. These are called strapping pins.

A strapping pin is a GPIO pin that the chip reads during reset or power-up to decide how it should start. After that short boot moment, the same pin may behave like a normal GPIO. This is why strapping pins can be confusing: the pin may work perfectly in your code, but still cause boot problems if your circuit pulls it to the wrong level when the board starts.

This guide explains what strapping pins are, why they matter, and how to use them safely.

The Short Version

A strapping pin is a boot configuration pin.

When the chip resets, it quickly checks the logic level on certain pins. Those levels tell the chip things like:

  • Should it boot normally from flash?
  • Should it enter download/programming mode?
  • Should it use a certain flash voltage?
  • Should it print boot messages?
  • Should it use a specific boot configuration?

Once the chip finishes reading those pins, they usually become normal GPIO pins again.

That last part is important. A strapping pin is not automatically a forbidden pin. It is a use-with-care pin.

The danger is not usually what your code does after boot. The danger is what your external circuit does during boot.

normal gpio vs strapping pin

A Simple Way to Think About It

Imagine the microcontroller wakes up and asks a few yes-or-no questions before running your program.

One pin might answer:

“Should I run the user program?”

Another pin might answer:

“Should I wait for a firmware upload?”

Another might answer:

“What voltage should I assume for the flash memory?”

The chip does not ask your Arduino sketch or ESP-IDF app for these answers. Your code has not started yet. The chip only sees the electrical levels on the strapping pins at that moment.

If a sensor, LED, pull-up resistor, pull-down resistor, button, transistor, or another module forces the wrong answer, the board may not boot the way you expect.

That is the whole idea behind strapping pins.

Why Strapping Pins Cause Real Project Problems

Strapping pin problems can look random when you first encounter them.

You may see symptoms like:

  • The board only boots when you disconnect a module.
  • The board uploads code, but the sketch does not run after reset.
  • The board works from USB but fails when powered from an external supply.
  • You need to press the BOOT button manually to upload.
  • The board gets stuck in download mode.
  • The serial monitor prints boot messages but the program never starts.
  • The circuit works on a breadboard once, then fails after you add another component.

The frustrating part is that the pin may still work as a GPIO after the board boots. So you might test the pin with digitalWrite() or digitalRead() and think everything is fine.

The real issue happened earlier, before your program had a chance to run.

What Happens During Boot

Here is the simplified boot sequence:

  1. Power is applied, or the reset pin is triggered.
  2. The chip waits briefly for power and reset conditions to stabilize.
  3. The chip reads the voltage levels on its strapping pins.
  4. Those levels are latched internally as boot configuration bits.
  5. The chip continues booting using that configuration.
  6. The strapping pins are released for normal GPIO use after reset.

The key point is step 3.

During that short moment, your external circuit must not force the strapping pin into the wrong state.

microcontroller boot sequence

Internal Pull-Ups and Pull-Downs

Many strapping pins have weak internal pull-up or pull-down resistors. These give the pin a default state if nothing else is connected.

For example, a pin may be weakly pulled high by default. If you leave it alone, the chip reads it as HIGH during boot.

But “weak” is the important word.

An external resistor, LED circuit, button, transistor, or connected module can overpower the internal pull resistor. If that external circuit pulls the pin the other way during reset, the chip may read the wrong boot configuration.

This is why a pin can be safe when left unused, but risky when connected to the wrong kind of load.

Common Circuits That Can Break Boot

Not every connection to a strapping pin is dangerous. The problem is usually a circuit that forces the pin high or low during reset. These are common troublemakers.

good vs bad strapping pin usage

Buttons

A button connected to a strapping pin can be fine if it is not pressed during reset. But if the button pulls the pin to the wrong level while the board starts, the chip may enter the wrong boot mode.

This is especially common with BOOT buttons. On many ESP32 boards, the BOOT button is intentionally connected to a boot strapping pin so the chip can enter firmware download mode.

That is useful for programming, but not ideal for a user-facing button in a finished project.

LEDs

An LED connected to a strapping pin can affect the pin level depending on how it is wired.

Some boards already have onboard LEDs connected to strapping pins. That does not automatically mean the board is badly designed. The manufacturer may have chosen resistor values and circuit direction so the pin still boots correctly.

But adding your own external LED to the same type of pin is different. If your LED circuit pulls the pin to the wrong state during reset, boot can fail.

Sensors and Modules

Some modules drive their output pins as soon as they receive power. If one of those outputs is connected to a strapping pin, the module may force a HIGH or LOW level before the microcontroller has booted.

This can happen with level shifters, displays, radio modules, motor drivers, and other boards that are not high-impedance at startup.

Pull-Up and Pull-Down Resistors

A pull-up or pull-down resistor can be helpful if it supports the required boot state.

But if you add a resistor that fights the required boot state, it can make the board unreliable or stop it from booting completely.

Large Capacitors

A capacitor on a strapping pin can delay the pin from reaching the correct voltage during reset. Even if the final voltage is correct, the chip may sample the pin before the voltage has settled.

This is one reason strapping pins are not good places for random RC filters unless you understand the boot timing.

Strapping Pins Are Not the Same on Every ESP32

One common mistake is assuming “ESP32 strapping pins” means the same thing for every ESP32-family board.

It does not.

Different chips have different strapping pins. An original ESP32 is not the same as an ESP32-C3, ESP32-S2, ESP32-S3, or ESP32-C6.

Here are common examples:

Chip family Common strapping pins
ESP32 GPIO0, GPIO2, GPIO5, GPIO12 / MTDI, GPIO15 / MTDO
ESP32-S2 GPIO0, GPIO45, GPIO46
ESP32-S3 GPIO0, GPIO3, GPIO45, GPIO46
ESP32-C3 GPIO2, GPIO8, GPIO9
ESP32-C6 GPIO4 / MTMS, GPIO5 / MTDI, GPIO8, GPIO9, GPIO15

This is why board-specific pinout references matter. A pin that is harmless on one board may be a boot-sensitive pin on another.

When using MicroPinouts, check the warnings on the specific board page instead of assuming all ESP32 boards behave the same way.

esp32 strapping pins guidie

Example: GPIO0 on Many ESP32 Boards

GPIO0 is one of the most familiar strapping pins on many ESP32 boards.

On many development boards, GPIO0 is connected to the BOOT button. When GPIO0 is held low during reset, the chip can enter download mode so new firmware can be uploaded.

That is useful when programming the board.

But it also means you should be careful about using GPIO0 for a circuit that may be pulled low during startup. If your external circuit holds GPIO0 low when the board resets, the chip may wait for a firmware upload instead of running your program.

This is why GPIO0 is usually not a good first choice for relays, mode switches, external buttons, or anything that can force a level during boot.

Example: GPIO12 on the Original ESP32

On the original ESP32, GPIO12 is also known as MTDI. It has an important boot-time role related to the flash voltage configuration.

This is one of the pins that can cause confusing “dead board” behavior if it is pulled to the wrong level during reset.

The lesson is simple: do not treat GPIO12 on classic ESP32 boards as just another random GPIO unless you know what your connected circuit does during boot.

For beginner projects, it is usually easier to choose a safer pin.

Example: ESP32-C3 GPIO8 and GPIO9

On ESP32-C3 boards, GPIO8 and GPIO9 are strapping pins. This matters because many small ESP32-C3 boards expose only a limited number of pins, so users are tempted to use every available GPIO.

Some ESP32-C3 boards also connect onboard LEDs or BOOT buttons to boot-related pins. That does not mean the pin is unusable, but it does mean you should be careful when adding external circuits.

If a board page marks GPIO8 or GPIO9 as a strapping pin, treat it as a warning: check what else is connected, and avoid forcing that pin to the wrong level during reset.

Can You Still Use Strapping Pins?

Yes, in many cases you can.

But use them with more care than ordinary GPIO pins.

A strapping pin is usually safer when:

  • The external circuit is high-impedance during reset.
  • The circuit does not force the pin against its required boot level.
  • Any pull-up or pull-down resistor supports the correct boot state.
  • The pin is not connected to a large capacitor.
  • The connected device does not drive the pin before the microcontroller boots.
  • You have tested cold boot, reset, and firmware upload behavior.

A strapping pin is riskier when:

  • It controls a relay, MOSFET, motor driver, or transistor gate.
  • It is connected to a button that users may hold during reset.
  • It is connected to a module that drives the line at power-up.
  • It has a strong pull-up or pull-down resistor.
  • It has an LED circuit that changes the boot level.
  • It must be in a guaranteed state before your code runs.

For hobby projects, the simplest rule is this:

Use normal GPIO pins first. Use strapping pins only when you understand the startup behavior.

Good Uses for Strapping Pins

Strapping pins are not useless. They can still be fine for many purposes after the board has booted.

They may be acceptable for:

  • Status LEDs, if the circuit does not disturb boot
  • Inputs with safe pull resistor values
  • Signals that remain floating or high-impedance during reset
  • Optional features that do not affect startup
  • Debug or test points
  • Low-risk outputs that are not connected to critical hardware

But avoid using them for anything that could make the board unsafe or unreliable if it glitches at boot.

For example, do not use a strapping pin as the first choice for a motor enable line, relay driver, heater control, or power switch control. Even if the pin works in code, it may behave unexpectedly before your firmware starts.

How to Check if a Strapping Pin Is Causing Your Problem

If your board does not boot reliably, try this checklist.

First, disconnect any external circuit connected to the strapping pins. Then power-cycle the board, not just reset it from software.

If the board boots normally after disconnecting the circuit, reconnect parts one at a time.

Check for these conditions:

  • Is the pin pulled high or low through a resistor?
  • Is a button holding the pin active during reset?
  • Is an LED connected in a way that changes the pin level?
  • Is another module powered before the microcontroller?
  • Does the connected module drive the line during startup?
  • Is there a capacitor slowing the voltage transition?
  • Does the board boot differently from USB power versus external power?

A multimeter can help, but an oscilloscope is better because the important moment happens during reset. The pin may look fine after boot, even if it was wrong at the exact sampling time.

strapping pin boot guide

Practical Design Rules

For quick projects, use this order of preference:

  1. Use clearly safe GPIO pins first.
  2. Use pins with minor limitations next.
  3. Use strapping pins only when needed.
  4. Avoid flash, USB, reset, and power-sensitive pins unless the board documentation says they are safe for your use.

If you must use a strapping pin:

  • Match the required boot default state.
  • Avoid strong pull resistors in the wrong direction.
  • Avoid large capacitors.
  • Avoid connecting active module outputs directly.
  • Add a series resistor where appropriate.
  • Test upload, reset, and cold boot.
  • Test with the final power supply, not only USB.
  • Leave a way to disconnect the circuit during debugging.

The last point matters. If you design a custom PCB and a strapping pin problem appears, a jumper, solder bridge, or removable resistor can save a lot of time.

What MicroPinouts Means by “Use With Care”

On MicroPinouts, a strapping pin warning should not be read as “this pin is broken.”

It means:

“This pin has a boot-time function. It may work as GPIO after reset, but your external circuit must not interfere with the required startup level.”

That is more accurate than simply labeling the pin as unsafe.

Some projects can use strapping pins without any issue. Others will fail immediately because of one resistor, one LED, one button, or one connected module.

The important question is not only “Can this pin be GPIO?”

The better question is:

“What does this pin see during reset?”

Final Advice

Strapping pins are one of those microcontroller details that feel invisible until they ruin your afternoon.

The board may look fine. The code may compile. The wiring may seem correct. But if the wrong voltage appears on a boot-sensitive pin at the wrong time, the chip may never reach your program.

So when choosing pins, do not only check whether a pin supports digital input, PWM, I2C, SPI, or ADC. Also check whether it has a boot-time role.

For beginners, the safest habit is simple:

Use the clearly safe pins first. Treat strapping pins as backup pins. And when you do use them, make sure your circuit leaves the chip’s boot decision alone.