Language: EN

que-pines-puedo-usar-esp32

Which pins can I use on an ESP32

In the previous post, we looked in detail at the different pins of the ESP32, as well as their specific functions and utilities.

However, as with the ESP8266, not all of the ESP32 pins are equally safe to use in our projects.

This is because some pins perform specific roles or participate in the device boot process. Incorrectly using these pins can cause conflicts that may prevent your project from working, or even break something.

If you are using an ESP32-S3, you have a similar summary in this post Which pins can I use on an ESP32-S3

Summary of pins

Therefore, it is very useful to have a reference table that provides clear and precise information about which pins are safe to use and which have specific functions.

I advise you to have this table on hand and consult it before starting a project with an ESP32, to avoid surprises from using a pin that should not be used.

GPIONAMEFUNCTIONSYOU CAN USE IT
0IO0GPIO0, ADC2_CH1, TOUCH_CH1, Boot⚠️Pulled-UP. Must be HIGH at boot.
Must be LOW for flashing.
Generates PWM at boot
1TXGPIO1, U0TXD❌Pin TX. Debug output at boot
2IO2GPIO2, ADC2_CH2, TOUCH_CH2⚠️Must be floating or LOW for flashing.
Connected to LED
3RXGPIO3, U0RXD❌Pin RX. HIGH at boot
4IO4GPIO4, ADC2_CH0, TOUCH_CH0✔️
5IO5GPIO5⚠️Must be HIGH at boot.
Generates PWM signal at boot
6CLKGPIO6❌FLASH SPI
7D0GPIO7❌FLASH SPI
8D1GPIO8❌FLASH SPI
9D2GPIO9❌FLASH SPI
10D3GPIO10❌FLASH SPI
11CMDGPIO11❌FLASH SPI
12IO12GPIO12, ADC2_CH5, TOUCH_CH5, MTDI⚠️Must be LOW at boot
Debug JTAG
13IO13GPIO13, ADC2_CH4, TOUCH_CH4, MTCK🟢Debug JTAG
14IO14GPIO14, ADC2_CH6, TOUCH_CH6, MTMS⚠️Generates PWM signal at boot
Debug JTAG
15IO15GPIO15, ADC2_CH3, TOUCH_CH3, MTDO⚠️Must be HIGH at boot
Debug JTAG
16IO16GPIO16✔️
17IO17GPIO17✔️
18IO18GPIO18✔️
19IO19GPIO19✔️
21IO21GPIO21✔️
22IO22GPIO22✔️
23IO23GPIO23✔️
25IO25GPIO25, ADC1_CH8, DAC_1✔️
26IO26GPIO26, ADC2_CH9, DAC_2✔️
27IO27GPIO27, ADC2_CH7, TOUCH_CH7✔️
32IO32GPIO32, ADC1_CH4, TOUCH_CH9, XTAL_32K_P✔️
33IO33GPIO33, ADC1_CH5, TOUCH_CH8, XTAL_32K_N✔️
34IO34GPIO34, ADC1_CH6, VDET_1⚠️Input only
35IO35GPIO35, ADC1_CH7, VDET_2⚠️Input only
36VPGPIO36, ADC1_CH0, S_VP⚠️Input only
37VPGPIO37⚠️Input only
38VPGPIO38⚠️Input only
39VNGPIO39, ADC1_CH3, S_VN⚠️Input only
ENENCHIP_PU, Reset