A dev board that refuses to boot, an analog reading that works on the bench and vanishes the moment WiFi joins, a sensor that reads fine until you add a pullup. Most of these are not broken boards. They are pin choices. The silkscreen prints GPIO numbers and nothing about what those pins are doing behind your back.
The four pins that decide how the ESP32 boots
On the ESP32 DevKit V1 (the 38 pin WROOM board everyone buys first), four pins are sampled while the chip resets:
- GPIO 0 low at reset means download mode. That is what the BOOT button does. A peripheral that holds it low turns your board into one that "bricked after I added the sensor".
- GPIO 2 must be low or floating at reset for a normal serial flash. Driving it high during boot is a common boot loop.
- GPIO 12 is the flash voltage strap. High at reset tells the chip its flash runs at 1.8 V. Most modules expect 3.3 V, so a pullup or a peripheral holding GPIO 12 high can put the board into a brownout loop that looks exactly like dead hardware.
- GPIO 15 affects boot timing and the boot log. It is the mildest of the four, but it is still not a free pin.
The rule that saves weekends: treat 0, 2, 12 and 15 as outputs you drive late in setup, or avoid them entirely. If a project must use one, make sure nothing pulls it the wrong way during reset.
ADC2 belongs to the WiFi radio
GPIO 0, 2, 4, 12 through 15 and 25 through 27 are ADC2 pins. While WiFi is active, ADC2 is handed to the radio. Your readings return zero, noise, or nothing at all. This is the single most common "my sensor works until I add WiFi" bug on the classic ESP32.
The fix is boring: put analog sensors on ADC1 pins (GPIO 32 through 39), or sample before the radio starts. On the ESP32-C3 there is one ADC block, so the conflict does not exist there.
Input only really means input only
GPIO 34 through 39 are input only. No output, and no internal pullups or pulldowns either. If you wire a button to GPIO 34 and expect the internal pullup to hold it high, you get floating garbage. Add the resistor.
Also worth remembering: GPIO 6 through 11 connect the module's flash. They are exposed on some boards as holes or test points. Leave them alone.
The C3 SuperMini's smaller trap set
The 2 dollar ESP32-C3 SuperMini shrinks the problem but does not remove it. Its strapping pins are GPIO 2, GPIO 8 and GPIO 9:
- GPIO 9 is the BOOT button. Hold it low at reset and you are in download mode. Sensors or LEDs on GPIO 9 are a boot hazard.
- GPIO 8 and GPIO 2 are sampled too. GPIO 8 in particular wants a defined level at reset on many modules.
And the two pins you never think about: GPIO 18 and 19 are the USB D minus and D plus lines. Use them for something else and your USB connection disappears right when you want to reflash.
A pin budget before the first wire
Before soldering anything, write down four things: which pins the boot process reads (strap pins), which pins the radio owns when connected (ADC2 on the classic chip), which pins are input only, and which pins the flash needs. Everything left is genuinely yours.
That is the whole trick. Cheap boards are not random, they just do not tell you the rules on the silkscreen.
Full per-pin references with ADC, touch and PWM flags, strapping warnings and per-pin anchors: ESP32 DevKit V1 pinout and ESP32-C3 SuperMini pinout. More free calculators and references at tinkernews.com/tools.
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.