The ESP32-S3 is a complex machine, with a large number of pins and functions, and many configuration options. Therefore, each pin shares more than one functionality.
As a result, just like in the ESP8266 and in the ESP32 (non-S version), not all pins are usable in our projects.
Therefore, it is very useful to have a summary table with the pins and their functions, indicating which pins are safe to use in our project.
If you are using an ESP32, you have a similar summary in this post Which pins can I use on an ESP32
Strapping Pins
The ESP32 chip has the following strapping pins.
- ⚠️ GPIO 0 - Chip boot mode
- ⚠️ GPIO 46 - Chip boot mode and ROM messages printing
Boot Mode | GPIO0 Pulled-up | GPIO46 Pulled-down |
---|---|---|
SPI Boot | 1 | x |
Download | 0 | 0 |
- ⚠️ GPIO 3 - JTAG signal source
- ⚠️ GPIO 45 - VDD_SPI voltage, select between 1.8V and 3.3V
These pins affect the configuration during startup, so it is best to avoid using them in our project.
Other pins to avoid using
These are the other pins that are conflicting, and we should avoid using.
- ❌SPI0/1: GPIO26-32 pins are generally used for SPI flash memory and PSRAM, and are not recommended for use for other functions.
- ⚠️ USB_D: GPIO19-20 pins are connected to the USB_D.
- 🟢 PSRAM: GPIO33-37 pins cannot be used if they are also connected to the SPI or PSRAM (usually not)
- 🟢 JTAG: GPIO39-42 pins cannot be used if you use online JTAG debugging for online debugging.
Those marked with 🟢 depend on the configuration of our board. In general, we should be able to use them.
Summary of the pins
Here is the final summary table of the pins, and whether we can use them safely in our project.
GPIO | FUNCTIONS | CAN USE |
---|---|---|
0 | RTC_GPIO0, GPIO0 | ⚠️ STRAPPING Pulled-up |
1 | RTC_GPIO1, GPIO1, TOUCH1, ADC1_CH0 | ✔️ |
2 | RTC_GPIO2, GPIO2, TOUCH2, ADC1_CH1 | ✔️ |
3 | RTC_GPIO3, GPIO3, TOUCH3, ADC1_CH2 | ⚠️ STRAPPING Floating |
4 | RTC_GPIO4, GPIO4, TOUCH4, ADC1_CH3 | ✔️ |
5 | RTC_GPIO5, GPIO5, TOUCH5, ADC1_CH4 | ✔️ |
6 | RTC_GPIO6, GPIO6, TOUCH6, ADC1_CH5 | ✔️ |
7 | RTC_GPIO7, GPIO7, TOUCH7, ADC1_CH6 | ✔️ |
8 | RTC_GPIO8, GPIO8, TOUCH8, ADC1_CH7 | ✔️ |
9 | RTC_GPIO9, GPIO9, TOUCH9, ADC1_CH8, FSPIHD | ✔️ |
10 | RTC_GPIO10, GPIO10, TOUCH10, ADC1_CH9, FSPICS0, FSPIIO4 | ✔️ |
11 | RTC_GPIO11, GPIO11, TOUCH11, ADC2_CH0, FSPID, FSPIIO5 | ✔️ |
12 | RTC_GPIO12, GPIO12, TOUCH12, ADC2_CH1, FSPICLK, FSPIIO6 | ✔️ |
13 | RTC_GPIO13, GPIO13, TOUCH13, ADC2_CH2, FSPIQ, FSPIIO7 | ✔️ |
14 | RTC_GPIO14, GPIO14, TOUCH14, ADC2_CH3, FSPIWP, FSPIDQS | ✔️ |
15 | RTC_GPIO15, GPIO15, U0RTS, ADC2_CH4, XTAL_32K_P | ✔️ |
16 | RTC_GPIO16, GPIO16, U0CTS, ADC2_CH5, XTAL_32K_N | ✔️ |
17 | RTC_GPIO17, GPIO17, U1TXD, ADC2_CH6, DAC_1 | ✔️ |
18 | RTC_GPIO18, GPIO18, U1RXD, ADC2_CH7, DAC_2, CLK_OUT3 | ✔️ |
19 | RTC_GPIO19, GPIO19, U1RTS, ADC2_CH8, CLK_OUT2, USB_D- | ⚠️ USB_D- |
20 | RTC_GPIO20, GPIO20, U1CTS, ADC2_CH9, CLK_OUT1, USB_D+ | ⚠️ USB_D+ |
21 | RTC_GPIO21, GPIO21 | ✔️ |
22 | GPIO22 | ✔️ |
23 | GPIO23 | ✔️ |
24 | GPIO24 | ✔️ |
25 | GPIO25 | ✔️ |
26 | SPICS1, GPIO26 | ❌ FLASH SPI |
27 | SPIHD, GPIO27 | ❌ FLASH SPI |
28 | SPIWP, GPIO28 | ❌ FLASH SPI |
29 | SPICS0, GPIO29 | ❌ FLASH SPI |
30 | SPICLK, GPIO30 | ❌ FLASH SPI |
31 | SPIQ, GPIO31 | ❌ FLASH SPI |
32 | SPID, GPIO32 | ❌ FLASH SPI |
33 | SPIIO4, GPIO33, FSPIHD | 🟢 PSRAM |
34 | SPIIO5, GPIO34, FSPICS0 | 🟢 PSRAM |
35 | SPIIO6, GPIO35, FSPID | 🟢 PSRAM |
36 | SPIIO7, GPIO36, FSPICLK | 🟢 PSRAM |
37 | SPIDQS, GPIO37, FSPIQ | 🟢 PSRAM |
38 | GPIO38, FSPIWP | ✔️ |
39 | MTCK, GPIO39, CLK_OUT3 | 🟢 DEBUG JTAG |
40 | MTDO, GPIO40, CLK_OUT2 | 🟢 DEBUG JTAG |
41 | MTDI, GPIO41, CLK_OUT1 | 🟢 DEBUG JTAG |
42 | MTMS, GPIO42 | 🟢 DEBUG JTAG |
43 | U0TXD, GPIO43, CLK_OUT1 | ⚠️ U0TX |
44 | U0RXD, GPIO44, CLK_OUT2 | ⚠️ U0RX |
45 | GPIO45 | ❌ STRAPPING Pulled-down |
46 | GPIO46 | ❌ STRAPPING Pulled-down |
EN | CHIP_PU, Reset | ❌ |