ESP32S2 Native USB

ESP32-S2 board featuring native USB OTG support - perfect for USB device emulation and HID applications.

USB-C Native USB
ESP32S2 Native USB board
ESP32-S2
MCU
240MHz
clock
4MB
flash
320KB
SRAM
26· 20 ADC
GPIO
Wi-Fi
radio
On this page

ESP32S2 Native USB Pinout

27 pins
ESP32S2 Native USB pinout diagram
PinGPIOLabelsStatusCapabilitiesNotes
11A0T1PWMsafeadc · touch
22A1T2PWMsafeadc · touch
33A2T3PWMsafeadc · touch
44A3T4PWMsafeadc · touch
55A4T5PWMsafeadc · touch
66A5T6PWMsafeadc · touch
77A6T7PWMsafeadc · touch
88SDAA7T8PWMsafeadc · touch · i2c
99SCLA8T9PWMstrappingadc · touch · i2c
1010A9T10PWMstrappingadc · touch
1111A10T11PWMstrappingadc · touch
1212A11T12PWMstrappingadc · touch
1313A12T13PWMstrappingadc · touch
1414A13T14PWMstrappingadc · touch
1515A14PWMstrappingadc
1616A15PWMstrappingadc
1717A16DAC1PWMsafeadc · dac
1818A17DAC2PWMsafeadc · dac
1919A18PWMuartadc
2020A19PWMuartadc
2134SSPWMsafespi
2235MOSIPWMsafespi
2336SCKPWMsafespi
2437MISOPWMsafespi
2543TXPWMuartuart
2644RXPWMuartuart
27-USB_FW_MSC_SERIAL_NUMBERsafe-
26 GPIOs broken out 16 free · 8 need care · 2 to avoid

Start with these

16 pins with no boot or system involvement
A0GPIO1A1GPIO2A2GPIO3A3GPIO4A4GPIO5A5GPIO6A6GPIO7SDAGPIO8A16GPIO17A17GPIO18SSGPIO34MOSIGPIO35SCKGPIO36MISOGPIO37TXGPIO43RXGPIO44

Freely assignable - no strapping, flash, USB or JTAG duties. Ideal first picks for buttons, sensors and LEDs.

Fine - with a little care

8 pins · 3 things to know
SCLGPIO9A9GPIO10A10GPIO11A11GPIO12A12GPIO13A13GPIO14 General-purpose SPI2 (FSPI) IO MUX pins Other

IO MUX pin of the general-purpose SPI2 (FSPI) bus, not of the in-package flash - that sits on GPIO26-32. The datasheet does not restrict it, so it is only taken if your board wires flash, an SD card or a display to FSPI.

  • SCLGeneral-purpose SPI2 (FSPI) IO MUX pin - hold/data line (FSPIHD)
  • A9General-purpose SPI2 (FSPI) IO MUX pin - chip select (FSPICS0)
  • A10General-purpose SPI2 (FSPI) IO MUX pin - data in (FSPID)
  • A11General-purpose SPI2 (FSPI) IO MUX pin - clock (FSPICLK)
  • A12General-purpose SPI2 (FSPI) IO MUX pin - data out (FSPIQ)
  • A13General-purpose SPI2 (FSPI) IO MUX pin - write-protect/data line (FSPIWP)
A14GPIO15 32.768 kHz RTC crystal oscillator positive input (XTAL_32K_P); also functions as GPIO15 (U0RTS, ADC2_CH4). Other

If an external 32 kHz crystal is used for RTC, this pin is dedicated to the crystal and cannot be used as GPIO.

A15GPIO16 32.768 kHz RTC crystal negative input (XTAL_32K_N); also GPIO16 (U0CTS, ADC2_CH5). Other

If using an external 32 kHz crystal, this pin is connected to the crystal and should not be used as general I/O.

Only if you know the tricks

2 pins · 2 things to know
A18GPIO19 USB OTG D- line (full-speed USB data -); also available as GPIO19/RTC_GPIO19 and ADC2 channel 8. USB

Used for USB communication; using this pin as general GPIO can interfere with USB functionality.

A19GPIO20 USB OTG D+ line (full-speed USB data +); also serves as GPIO20/RTC_GPIO20 and ADC2 channel 9. USB

Dedicated to USB interface; repurposing as GPIO may disrupt USB connectivity.

These are recommendations, not hard rules - with the right pull-ups, timing and boot-state awareness most pins can be made to work. When in doubt, start green.

The ESP32S2 Native USB breaks out 27 pins in total: 26 GPIO for your project.

For peripherals, I²C is mapped to SDA on GPIO8 and SCL on GPIO9; the SPI bus (MOSI, MISO, SCK, SS) is broken out in full; TX/RX on GPIO43 and GPIO44 cover serial logging and flashing.

On the analog side there are 20 ADC-capable pins for sensors and battery monitoring, 14 capacitive-touch inputs and 2 true DAC outputs.

If you want zero surprises, A0, A1, A2, A3 and 12 more are free of any such role - the safest first picks. 8 of the exposed pins carry boot-time or system duties on the ESP32-S2 (SCL, A9, A10 and 5 more).

Getting started

flash your first firmware in ~2 minutes
Tool:
1
Connect over USB
Native USB - shows up as a port right away, no driver needed. Not detected? Hold BOOT while plugging in.
2
Match & flash
Set the Tools options shown, then click Upload.
3
Verify it runs
GPIO1 toggles - wire an LED and resistor to it, or change the pin to your board's own LED.
Set these in Tools · leave everything else at default
Arduino IDE 2.x - Tools Copy
Board: "ESP32S2 Dev Module"▸
USB CDC On Boot: "Enabled"▸
Flash Size: "4MB (32Mb)"▸
Flash Mode: "DIO"▸
Partition Scheme: "Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)" (default)▸
Upload Speed: "921600"▸
▸ every other Tools option - leave at default
Board: ESP32S2 Dev Module
USB CDC On Boot: Enabled
Flash Size: 4MB (32Mb)
Flash Mode: DIO
Partition Scheme: Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
Upload Speed: 921600
Find it: Tools ▸ Board ▸ ESP32 Arduino ▸ ESP32S2 Dev Module
blink.ino Copy
// toggle GPIO1 - wire an LED and resistor to it
void setup() {
  pinMode(1, OUTPUT);
}
void loop() {
  digitalWrite(1, HIGH); delay(500);
  digitalWrite(1, LOW);  delay(500);
}
board to selectesp32-s2-saola-1⧉ copy
platformio.ini Copy
[env:esp32s2usb]
platform = espressif32
board = esp32-s2-saola-1
framework = arduino
monitor_speed = 115200
upload_speed = 921600
Find it: PlatformIO Home ▸ Boards, search esp32-s2-saola-1 - or type it after board =.
board to selectesp32-s2-saola-1⧉ copy
device.yaml Copy
esp32:
  board: esp32-s2-saola-1
  variant: esp32s2
  framework:
    type: esp-idf

# blink - GPIO1
output:
  - platform: gpio
    pin: 1
    id: led_out
light:
  - platform: binary
    name: "LED"
    output: led_out
Find it: search ESPHome's board list for esp32-s2-saola-1 (same ids as PlatformIO).
esptool doesn't pick board settings - a prebuilt .bin already has them baked in. This is just the raw flash command.
terminal Copy
esptool.py --chip esp32s2 --port /dev/ttyACM0 \
  --baud 921600 write_flash 0x1000 firmware.bin
--port = your /dev/tty* (macOS/Linux) or COMx (Windows).
Build details: sketch space 1310720 B · data 327680 B · DIO

Specifications

ESP32-S2 · vs other ESP32 chips →
Compute
MCU
ESP32-S2
Clock
240 MHz
SRAM · Flash
320 KB · 4MB
Radio
Wi-Fi
802.11 b/g/n 2.4 GHz
Bluetooth
-
Antenna
PCB
I/O
GPIO · ADC
26 · 20
UART · I²C · SPI
2 · 2 · 2
PWM
8 channels
Power
USB
USB-C
Serial
Native (CDC)
Boot address
0x1000
Flashing
Upload · OTA
esptool_py · esp_ota
Flash · Boot mode
DIO · QIO
Sketch · Data
1.25 MB · 320 KB
The ESP32S2 Native USB uses esptool_py for firmware uploads, esp_ota for over-the-air (OTA) updates. Flash mode is DIO with QIO boot mode. The maximum sketch size is 1.25 MB with 320 KB available for data.

About this board

At its core is the ESP32-S2 - a single-core Xtensa with native USB-OTG and no Bluetooth.

Onboard you'll find Reset/Boot buttons.

It flashes over native USB - no serial-converter driver needed, which isn't a given among ESP32-S2 boards.

Resources

Similar boards