The ESP32-S2 trades the original ESP32’s Bluetooth and dual-core architecture for a single-core 240 MHz Xtensa LX7, native USB OTG, and 43 programmable GPIOs. Because it lacks a dedicated hardware UART-to-USB bridge on many bare-bones dev boards, understanding the native USB routing and strapping pin states is critical before you wire up your first sensor. Below is the functional mapping for the most critical pins on standard ESP32-S2-WROOM modules and Saola-1 dev boards.

ESP32-S2 Functional Pinout Reference

Use this table to map your physical wires to the silicon. For the full 43-pin matrix, consult the Espressif ESP32-S2 Datasheet.

Function / Peripheral GPIO Pin(s) Direction / Type Hardware Notes & Constraints
Power (Logic) 3V3 Power In/Out Max draw ~500mA depending on onboard LDO. Do not feed 5V here.
Power (Input) 5V / VIN Power In Feeds the onboard LDO. Bypass LDO if feeding regulated 3.3V to 3V3 pin.
Native USB D- GPIO19 Bidirectional Native USB OTG. Requires series 22Ω resistors on custom PCBs.
Native USB D+ GPIO20 Bidirectional Native USB OTG. Also used for USB CDC/JTAG debugging.
Strapping: Boot Mode GPIO0 Input (Internal Pull-up) HIGH = SPI Flash Boot. LOW = UART/USB Bootloader. Must be LOW to flash.
Strapping: VDD_SPI GPIO45 Input LOW = VDD_SPI outputs 3.3V. HIGH = VDD_SPI outputs 3.6V (for specific flash chips).
Strapping: Log Print GPIO46 Input LOW = Print boot log to UART. HIGH = Silent boot.
Default I2C (Arduino) GPIO1 (SDA), GPIO2 (SCL) Open-Drain Software defaults for Saola-1. Requires 4.7kΩ pull-ups to 3.3V.
Default SPI (VSPI) 11 (MOSI), 12 (MISO), 13 (SCK), 10 (CS) Push-Pull Hardware SPI. Pin 14 is often used as an alternative CS.
Onboard LED GPIO15 Output Standard on Saola-1. Active HIGH. Tied to Neopixel on some DevKitM variants.

Decoding Standards: USB Colors and Logic Levels

When wiring the ESP32-S2’s native USB (GPIO19 and GPIO20) to a custom Type-C or Micro-B receptacle, you must adhere to standard wiring color codes. Miswiring D+ and D- will not fry the chip, but the host PC will fail to enumerate the device, throwing a "USB device descriptor request failed" error in Windows Device Manager.

USB 2.0 Wire Color Standards

  • USB-IF Standard (TIA/EIA-364): Red = 5V (VBUS), Black = GND, Green = D+ (GPIO20), White = D- (GPIO19).
  • Clone/Proprietary Variant: Cheap USB cables harvested from consumer electronics often ignore the USB-IF spec. You may encounter Blue for D+ and Yellow for D-, or entirely random colors. Always verify continuity with a multimeter before soldering harvested cables.

Logic Level Thresholds (IEC / JEDEC)

The ESP32-S2 operates at 3.3V logic. According to standard 3.3V CMOS thresholds, the chip will reliably read a LOW signal below 0.99V (0.3 × VDD) and a HIGH signal above 2.31V (0.7 × VDD). If you are interfacing with 5V logic (like an older Arduino Uno or a 5V I2C LCD), a logic level shifter (e.g., TXS0108E or BSS138 MOSFET circuit) is mandatory to prevent long-term degradation of the GPIO input protection diodes.

The "Rows People Get Wrong" Notes

Even experienced makers trip over a few ESP32-S2-specific quirks that differ from the original ESP32. Watch out for these common pitfalls:

Warning: The Missing GPIO21
On the original dual-core ESP32, GPIO21 was the default I2C SDA pin. On the ESP32-S2, GPIO21 does not exist. It was removed to accommodate the native USB routing and additional touch sensor pins. If you port code from an old ESP32 project and hardcode Wire.begin(21, 22), your I2C bus will silently fail to initialize.

Strapping Pin Conflicts

GPIO0, GPIO3, GPIO45, and GPIO46 are sampled during the reset phase. If you wire a relay, a low-side NPN transistor, or a pull-down switch to GPIO0 or GPIO45 without accounting for the boot sequence, the ESP32-S2 will either fail to boot your sketch or brownout the flash memory.

  • GPIO0: If tied to a relay coil that pulls low on startup, the chip will enter the UART bootloader and hang, ignoring your setup() function.
  • GPIO45: Accidentally pulling this HIGH tells the internal VDD_SPI regulator to output 3.6V. If your attached SPI flash or PSRAM is strictly rated for 3.3V, you risk overvoltage damage.

Native USB vs. UART Bridge

Many ESP32-S2 dev boards (like the Saola-1) use the native USB (GPIO19/20) for both power and serial communication. Unlike boards with a dedicated CH340 or CP2102 chip, the native USB CDC (Communication Device Class) requires the ESP32-S2 to run firmware to maintain the serial connection. If your code crashes or enters a deep sleep loop without initializing USB CDC, the COM port will disappear from your IDE. Always add a hardware reset button (EN pin to GND) to your custom PCBs.

Safe Interpretation When Markings Are Faded

On the workbench, silkscreen labels burn off from soldering iron proximity, or you might be reverse-engineering a bare ESP32-S2-WROOM module without a dev board carrier. When visual pinout markings are missing:

  1. Locate the Pin 1 Indicator: On the bare WROOM module, find the small dimple or dot on the RF shield. Pin 1 (GND) is immediately adjacent to this mark.
  2. Trace the VBUS and GND: Use your multimeter in continuity mode. The large exposed ground pads on the sides of the module are GND. The USB VBUS trace will typically route directly to the input capacitor of the onboard AMS1117-3.3 LDO.
  3. Identify the Native USB: GPIO19 and GPIO20 will route through two identical 22Ω or 27Ω series resistors near the USB connector. Finding these matched resistors is a dead giveaway for the native USB data lines.
  4. Verify via Blink Test: If you can flash the board but don't know which pin drives the onboard LED, write a rapid sequential blink sketch that toggles GPIO15, GPIO16, and GPIO18 to visually identify the active trace.

ESP32-S2 Pinout FAQ

Does the ESP32-S2 support Bluetooth?

No. The ESP32-S2 is a Wi-Fi-only microcontroller. Espressif removed the Bluetooth/BLE radio to reduce power consumption, lower the silicon cost, and free up die space for the native USB OTG controller and additional capacitive touch pins. If your project requires BLE beacons or Bluetooth audio, you must use the original ESP32, the ESP32-C3 (Wi-Fi + BLE 5), or the ESP32-S3.

Are any ESP32-S2 GPIO pins 5V tolerant?

Strictly speaking, no GPIO pins on the ESP32-S2 are 5V tolerant. The absolute maximum voltage on any GPIO pin is 3.6V relative to GND. Applying 5V directly to a pin will forward-bias the internal ESD protection diodes, causing excessive current to flow into the 3.3V rail. This can lead to phantom powering (where the chip runs entirely off the 5V GPIO injection, bypassing the LDO) and eventual thermal failure. Always use a voltage divider, an optocoupler, or a dedicated level shifter for 5V signals.

Why does my ESP32-S2 fail to upload code via native USB?

Because the ESP32-S2 uses native USB CDC instead of a hardware UART bridge, the chip must be running valid firmware to negotiate the USB handshake with your PC. If you bricked the firmware or the code crashes before USB initialization, the bootloader won't trigger automatically. The fix: Hold down the BOOT button (which pulls GPIO0 low), tap the RESET button (EN pin), and then release the BOOT button. This forces the chip into the ROM USB bootloader, allowing the Arduino IDE or ESP-IDF to push new firmware. For automated uploads in custom designs, wire a 1µF capacitor between the DTR line and the EN pin.