ESP32 USB Boot Mode (ESP32-S2/S3)
Understand and troubleshoot USB boot mode on ESP32-S2 and ESP32-S3 chips, which support native USB flashing without an external USB-to-serial adapter.
Common Causes
- 🔌
USB Not Recognized in Boot Mode
If GPIO0 is not held low during reset, or the USB cable is faulty, the chip may not appear as a USB device for flashing.
- ⚠️
Incorrect esptool or IDF Usage
Using UART-based esptool commands or unsupported upload methods will fail; native USB requires specific flags and drivers.
- 🔧
Boot Pin Configuration Prevents USB Mode
The chip may boot into SPI flash or run user code if boot pins are not held correctly at reset.
- 🧯
USB CDC Driver Not Installed
Windows, macOS, or Linux may fail to detect the USB device if drivers for native USB CDC or DFU are missing or incompatible.
Symptoms
No USB Device Detected After Reset
ESP32-S2/S3 does not appear in the system as a USB serial or DFU device, even though BOOT was held during reset.
Flashing Fails with "No serial ports found"
esptool or IDF tools report no available USB ports, or cannot open the device in CDC mode.
Upload Only Works via UART
Flashing works with UART adapters but fails when using onboard USB directly, indicating USB boot mode is not properly entered.
USB Port Appears Briefly Then Disappears
The board shows up as a USB device for a few seconds then disconnects, possibly due to unstable boot configuration or bad firmware.
Solutions
Manually Enter USB Boot Mode
Hold down BOOT (GPIO0), press and release EN (reset), then release BOOT. This forces ROM USB bootloader mode. See manual boot guide.
Use esptool or idf.py with USB Options
Use --port /dev/ttyUSBx
or --port usb
with the latest esptool.py
or idf.py
. Ensure you’re flashing in USB CDC mode, not UART.
Check USB Cable and System Drivers
Use a short, known-good USB data cable. Install necessary drivers on Windows for USB CDC or DFU support if needed.
Confirm Board Supports Native USB
Only ESP32-S2, S3, and C3 support native USB flashing. ESP32 and ESP32-WROOM do not and require UART-based upload.
More Details
ESP32 USB Boot Mode (ESP32-S2/S3) #
ESP32-S2, ESP32-S3, and ESP32-C3 chips feature native USB support, allowing direct firmware flashing over USB without the need for an external USB-to-serial adapter. This is made possible by the internal USB-OTG or USB-CDC hardware, which is recognized by the ROM bootloader when entering USB boot mode.
However, if USB flashing isn’t working, the device isn’t appearing, or upload fails despite correct drivers, this guide helps you understand how USB boot mode works and how to get it functioning reliably.
What Is USB Boot Mode? #
On ESP32-S2/S3, the ROM bootloader can expose a USB interface (CDC, DFU, or serial-jtag) over the native USB D+ and D− lines. When properly entered, the board shows up as a USB device and accepts firmware via:
esptool.py --port usb
idf.py flash
- Or other DFU tools for supported images
No external UART wiring is needed - and it can be faster and more reliable than serial flashing.
How to Enter USB Boot Mode #
To manually enter USB boot mode:
- Hold the BOOT button (or pull GPIO0 low)
- Press and release the EN (reset) button
- Release the BOOT button
This forces the chip into ROM bootloader mode via USB. You should now see a new USB device appear (e.g., /dev/ttyACM0
on Linux or a COM port on Windows).
If no port appears, try another USB cable or port, and confirm the chip supports USB (only S2/S3/C3).
Common Symptoms and Fixes #
❌ No USB Device Detected #
If nothing appears in lsusb
or Device Manager:
- Check your USB cable - some are power-only. Replace with a known-good data cable.
- Use a direct USB port (avoid unpowered hubs).
- Try rebooting the system or testing on another OS.
⚠️ Upload Fails with esptool.py
#
You may see:
esptool.py v4.5
No serial ports found
This means the tool didn’t detect the USB CDC device. Make sure you used:
esptool.py --chip esp32s3 --port usb write_flash 0x0 firmware.bin
Or with IDF:
idf.py -p usb flash
The
--port
usb flag is essential - it auto-selects the USB device instead of searching for UART ports.
Supported Chips and Tools #
Native USB boot mode is supported on several newer ESP32 chips that feature USB-OTG or USB-CDC directly built into the silicon. This allows flashing without external USB-to-serial chips:
Chip | USB Flashing Support | Notes |
---|---|---|
ESP32 | ❌ No | Requires UART adapter |
ESP32-S2 | ✅ Yes (USB-OTG) | Enter USB ROM mode via BOOT+EN |
ESP32-S3 | ✅ Yes (USB-OTG/CDC) | Supports CDC and JTAG |
ESP32-C3 | ✅ Yes (USB-CDC) | USB-Serial built-in |
Recommended tools:
esptool.py
version 4.0 or neweridf.py
(from ESP-IDF v4.4 and up)- DFU tools (for advanced bootloader flashing)
🧯 USB Port Appears Briefly Then Vanishes #
If your ESP32-S2/S3 shows up as a USB device for a moment and then disappears, you might be facing one of the following issues:
Flaky Firmware or Boot Loop: If the last flashed firmware crashes on boot or disables USB, the port will disappear quickly after power-up. Try holding BOOT to re-enter USB boot mode without executing user code.
Floating or Misconfigured Boot Pins: The chip may fail to enter proper ROM USB mode if GPIO0 isn’t held low during reset. Always ensure correct boot pin logic during manual entry.
Unstable USB Power: Weak USB ports, long cables, or unpowered hubs may cause brownouts or timing glitches during USB enumeration. The device might disconnect before completing driver initialization.
USB Driver or OS Conflict: On Windows, incorrect or stale drivers can cause the device to appear briefly and then vanish due to failure to initialize properly. Try using the USB CDC driver provided by Espressif or check for conflicts in Device Manager.
Fixes:
- Use a known-good USB data cable, preferably short and shielded.
- Try a different USB port - rear ports on desktops are typically more reliable than laptop or hub connections.
- Hold BOOT and tap EN (reset) to enter ROM bootloader without running faulty firmware.
- Update or reinstall USB drivers (especially on Windows).
- Power cycle the board and retry if the device disappears due to a temporary glitch.
You can verify USB devices using:
lsusb
ordmesg
(Linux)- Device Manager (Windows)
- System Information > USB (macOS)
Look for a device named Espressif USB JTAG/CDC
or similar.

Quick Navigation
Additional Resources
Still Stuck with an ESP32 Issue? Let's solve it together.
Our interactive troubleshooting wizard will guide you through common ESP32 problems and their solutions, step by step.