What you see
The board boots, UART prints a few lines, then Wi-Fi start triggers a brownout detector reset or a hard reboot. The Station example looks guilty. On a custom PCB the usual cause is power delivery that cannot hold 3.3 V through the TX current spike.
Association and the first probe frames are when the radio draws hardest. A cable, connector, or regulator that looks fine with a blink sketch can still collapse for a few hundred microseconds under Wi-Fi.
Measure where the chip drinks
Put the scope or meter on the ESP32 module 3.3 V and GND pins during association, not only on the bench supply output. A soft USB cable or a long 5 V run drops voltage only under load.
Watch for dips below the brownout threshold while the chip associates. If the supply rail at the PSU looks clean but the module pin dips, the loss is between the regulator and the package: trace resistance, connector, or missing local capacitance.
Repeat with a short, known-good data cable before changing firmware flags.
Bulk capacitance close to the package
RF pulses need charge sitting next to the power pins. A large electrolytic only at the USB connector does not help the radio. Place bulk and high-frequency decoupling near the ESP32 / module VIN and GND, with a short return path.
Module makers publish recommended caps for a reason. Skipping them on a dense layout is a common first-board miss. Reflow tombstoning of those caps shows up as random brownouts that move when you probe.
Regulator and USB headroom
Wi-Fi TX peaks are short but high. A regulator that is rated for average current can still brown out if input headroom, thermal derating, or dropout is tight.
Power-bank and laptop USB ports vary. A port that can charge a phone may still sag on a thin cable into an ESP32 board with a weak LDO. Prefer a firm 5 V source while debugging, then re-test on the product cable.
Battery designs need the same discipline on the 3.3 V switcher: inductor, feedback layout, and load transient. Deep-sleep current is a different problem; do not mix the two debug paths.
Firmware last
Only after the rail holds under association should you revisit Wi-Fi init order, modem sleep, or TX power tables. Rewriting the Station example first hides a board bug and burns a week.
If brownout disappears with Wi-Fi off and returns the moment STA starts, treat power as guilty until the scope says otherwise.
When to send the power section
If the dip is real at the module pins, or the regulator choice is unclear, send Leo a photo of the power tree (USB or battery → 3.3 V → module) or the schematic snippet. A short note of measured dip voltage and cable type is enough — no purchase order required.
Short checklist version of this topic: /answers/esp32-brownout-reset.html