LOLIN S2 Mini Development Board
Code name: LOLIN_S2_MINI
LOLIN S2 Mini development board is based on esp32s2 microcontroller and uses xtensa architecture. This board has a maximum CPU frequency of 240 MHz and a flash size of 4MB.
About LOLIN S2 Mini
Compact ESP32-S2 board by Wemos with USB-C and LiPo charging β perfect for space-saving embedded builds.
Where to Buy
Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.
Technical Specifications
π°οΈ Connectivity
π§ Microcontroller
β¨ Features
- 48 digital IO pins
- 46 external interrupt pins
- 20 analog input pins
- 24 PWM pins
LOLIN S2 Mini Pinout
β Safe Pins to Use
For general GPIO usage, these are the safest and most flexible choices:
Why Are These Pins Safe?
- Not involved in bootstrapping β No impact on device boot mode or system startup
- Not linked to flash memory or PSRAM β Won't interfere with storage or memory access
- Not dedicated to USB or JTAG β Free for general use without affecting debugging
- No special hardware connections β Freely assignable without internal conflicts
β οΈ Pins to Avoid or Use with Caution
Some pins are reserved for critical functions like bootstrapping, JTAG debugging, USB communication, and flash memory operations. Misusing these pins may lead to boot failures, programming issues, USB conflicts, or disruptions in flash storage.
Critical Pin Categories:
- π οΈ Strapping Pins: Control boot behavior and flash voltage selection
- π JTAG Debugging Pins: Required for low-level debugging
- π USB Communication Pins: Used for USB Serial/JTAG communication
- β‘ Flash Memory & SPI Pins: Connected to SPI flash memory and PSRAM
- π‘ UART Serial Communication Pins: Used for debugging and firmware uploads
PIN | Label | Reason | Function |
---|---|---|---|
IO9 | FSPIHD | Typically used as flash/PSRAM IO line in certain configurations; avoid using as GPIO if flash or PSRAM is present. | β‘ Flash |
IO10 | FSPICS0 | Often used as flash chip select in some designs; not available for GPIO when controlling flash. | β‘ Flash |
IO11 | FSPID | Used for flash data transfer in certain configurations; should be avoided for general use if flash is connected. | β‘ Flash |
IO12 | FSPICLK | Used as flash clock line in some boards; not free for GPIO if driving flash. | β‘ Flash |
IO13 | FSPIQ | Used for flash data output in certain configurations; avoid using as GPIO if connected to flash. | β‘ Flash |
LOLIN S2 Mini Pin Mappings
This development board provides 48 digital IO pins, out of which 46 can be used as external interrupt pins , 20 as analog input pins and 24 pins have Pulse-Width Modulation (PWM) .
Pin | Function | ESP Pin | Input/Output | Description |
---|---|---|---|---|
1 | 5V | 5V | POWER INPUT | 5V power input for the board |
2 | GND | GND | POWER GROUNT | Ground connection |
3 | 3V3 | 3.3V | POWER OUTPUT | 3.3V power output |
5 | IO1 | GPIO1 | BIDIRECTIONAL | GPIO |
6 | IO2 | GPIO2 | BIDIRECTIONAL | GPIO, ADC |
7 | IO3 | GPIO3 | BIDIRECTIONAL | GPIO |
8 | IO4 | GPIO4 | BIDIRECTIONAL | GPIO, ADC |
9 | IO5 | GPIO5 | BIDIRECTIONAL | GPIO |
10 | IO6 | GPIO5 | BIDIRECTIONAL | GPIO |
11 | IO7 | GPIO5 | BIDIRECTIONAL | GPIO |
12 | IO8 | GPIO5 | BIDIRECTIONAL | GPIO |
13 | IO9 | GPIO5 | BIDIRECTIONAL | GPIO |
14 | IO10 | GPIO5 | BIDIRECTIONAL | GPIO |
15 | IO11 | GPIO5 | BIDIRECTIONAL | GPIO |
16 | IO12 | GPIO12 | BIDIRECTIONAL | GPIO, ADC |
17 | IO13 | GPIO13 | BIDIRECTIONAL | GPIO, ADC |
18 | IO14 | GPIO14 | BIDIRECTIONAL | GPIO, ADC |
19 | IO15 | GPIO15 | BIDIRECTIONAL | GPIO, ADC |
20 | IO16 | GPIO16 | BIDIRECTIONAL | GPIO |
21 | IO17 | GPIO17 | BIDIRECTIONAL | GPIO |
22 | IO18 | GPIO18 | BIDIRECTIONAL | GPIO |
23 | IO21 | GPIO21 | BIDIRECTIONAL | GPIO |
24 | IO33 | GPIO33 | BIDIRECTIONAL | GPIO, ADC |
25 | IO34 | GPIO34 | INPUT | GPIO, ADC |
26 | IO35 | GPIO35 | INPUT | GPIO, ADC |
27 | IO36 | GPIO36 | INPUT | GPIO, ADC |
28 | IO37 | GPIO37 | INPUT | GPIO, ADC |
29 | IO38 | GPIO38 | INPUT | GPIO, ADC |
30 | IO39 | GPIO39 | INPUT | GPIO, ADC |
31 | IO40 | GPIO40 | INPUT | GPIO, ADC |
LOLIN S2 Mini Pins Mapping Arduino IDE
Below you can find the LOLIN S2 Mini pinout. This development board provides 48 digital IO pins, out of which 46 can be used as external interrupt pins, 20 as analog input pins and 24 pins have Pulse-Width Modulation (PWM).
Pin | Analog | Touch | PWM | Other |
---|---|---|---|---|
1 | A0 | T1 | PWM | |
2 | A1 | T2 | PWM | |
3 | A2 | T3 | PWM | |
4 | A3 | T4 | PWM | |
5 | A4 | T5 | PWM | |
6 | A5 | T6 | PWM | |
7 | A6 | T7 | PWM | SCK |
8 | A7 | T8 | PWM | |
9 | A8 | T9 | PWM | MISO |
10 | A9 | T10 | PWM | |
11 | A10 | T11 | PWM | MOSI |
12 | A11 | T12 | PWM | SS |
13 | A12 | T13 | PWM | |
14 | A13 | T14 | PWM | |
15 | A14 | PWM | LED_BUILTIN | |
16 | A15 | PWM | ||
17 | A16 | PWM | DAC1 | |
18 | A17 | PWM | DAC2 | |
19 | A18 | PWM | ||
20 | A19 | PWM | ||
33 | PWM | SDA | ||
35 | PWM | SCL | ||
37 | PWM | RX | ||
39 | PWM | TX | ||
0x00000000 | USB_FW_MSC_SERIAL_NUMBER |
Default Tools
Bootloader tool | esptool_py |
Uploader tool | esptool_py |
Network uploader tool | esp_ota |
Bootloader address | 0x1000 |
Flash mode | dio |
Boot mode | qio |
Maximum upload size | 1280 Kb (1310720 B) |
Maximum data size | 320 Kb (327680 B) |
The LOLIN S2 Mini development board by default uses esptool_py uploader tool, esp_ota network uploader tool for Over-the-air (OTA) uploads and esptool_py bootloader tool. The bootloader starts at address "0x1000". Flash mode and boot mode for LOLIN S2 Mini development board by default is dio and qio respectively.