2. Pin Definitions
Name No. Type Function
VDET_1 10 I GPIO34, ADC1_CH6, RTC_GPIO4
VDET_2 11 I GPIO35, ADC1_CH7, RTC_GPIO5
32K_XP 12 I/O GPIO32, ADC1_CH4, RTC_GPIO9, TOUCH9, 32K_XP (32.768 kHz crystal oscillator input)
32K_XN 13 I/O GPIO33, ADC1_CH5, RTC_GPIO8, TOUCH8, 32K_XN (32.768 kHz crystal oscillator output)
GPIO25 14 I/O GPIO25, ADC2_CH8, RTC_GPIO6, DAC_1, EMAC_RXD0
GPIO26 15 I/O GPIO26, ADC2_CH9, RTC_GPIO7, DAC_2, EMAC_RXD1
GPIO27 16 I/O GPIO27, ADC2_CH7, RTC_GPIO17, TOUCH7, EMAC_RX_DV
MTMS 17 I/O GPIO14, ADC2_CH6, RTC_GPIO16, TOUCH6, EMAC_TXD2, HSPICLK, HS2_CLK, SD_CLK, MTMS
MTDI 18 I/O GPIO12, ADC2_CH5, RTC_GPIO15, TOUCH5, EMAC_TXD3, HSPIQ, HS2_DATA2, SD_DATA2, MTDI
VDD3P3_RTC 19 P Input power supply for RTC IO (2.3 V – 3.6 V)
MTCK 20 I/O GPIO13, ADC2_CH4, RTC_GPIO14, TOUCH4, EMAC_RX_ER, HSPID, HS2_DATA3, SD_DATA3, MTCK
MTDO 21 I/O GPIO15, ADC2_CH3, RTC_GPIO13, TOUCH3, EMAC_RXD3, HSPICS0, HS2_CMD, SD_CMD, MTDO
GPIO2 22 I/O GPIO2, ADC2_CH2, RTC_GPIO12, TOUCH2, HSPIWP, HS2_DATA0, SD_DATA0
GPIO0 23 I/O GPIO0, ADC2_CH1, RTC_GPIO11, TOUCH1, EMAC_TX_CLK, CLK_OUT1,
GPIO4 24 I/O GPIO4, ADC2_CH0, RTC_GPIO10, TOUCH0, EMAC_TX_ER, HSPIHD, HS2_DATA1, SD_DATA1
VDD_SDIO
GPIO16 25 I/O GPIO16, HS1_DATA4, U2RXD, EMAC_CLK_OUT
VDD_SDIO 26 P Output power supply: 1.8 V or the same voltage as VDD3P3_RTC
GPIO17 27 I/O GPIO17, HS1_DATA5, U2TXD, EMAC_CLK_OUT_180
SD_DATA_2 28 I/O GPIO9, HS1_DATA2, U1RXD, SD_DATA2, SPIHD
SD_DATA_3 29 I/O GPIO10, HS1_DATA3, U1TXD, SD_DATA3, SPIWP
SD_CMD 30 I/O GPIO11, HS1_CMD, U1RTS, SD_CMD, SPICS0
SD_CLK 31 I/O GPIO6, HS1_CLK, U1CTS, SD_CLK, SPICLK
SD_DATA_0 32 I/O GPIO7, HS1_DATA0, U2RTS, SD_DATA0, SPIQ
SD_DATA_1 33 I/O GPIO8, HS1_DATA1, U2CTS, SD_DATA1, SPID
VDD3P3_CPU
GPIO5 34 I/O GPIO5, HS1_DATA6, VSPICS0, EMAC_RX_CLK
GPIO18 35 I/O GPIO18, HS1_DATA7, VSPICLK
GPIO23 36 I/O GPIO23, HS1_STROBE, VSPID
VDD3P3_CPU 37 P Input power supply for CPU IO (1.8 V – 3.6 V)
GPIO19 38 I/O GPIO19, U0CTS, VSPIQ, EMAC_TXD0
GPIO22 39 I/O GPIO22, U0RTS, VSPIWP, EMAC_TXD1
U0RXD 40 I/O GPIO3, U0RXD, CLK_OUT2
U0TXD 41 I/O GPIO1, U0TXD, CLK_OUT3, EMAC_RXD2
GPIO21 42 I/O GPIO21, VSPIHD, EMAC_TX_EN
Analog
VDDA 43 P Analog power supply (2.3 V – 3.6 V)
XTAL_N 44 O External crystal output
XTAL_P 45 I External crystal input
VDDA 46 P Analog power supply (2.3 V – 3.6 V)
CAP2 47 I Connects to a 3 nF capacitor and 20 kΩresistor in parallel to CAP1
CAP1 48 I Connects to a 10 nF series capacitor to ground
GND 49 P Ground
Note:
• ESP32-D2WD’s pins GPIO16, GPIO17, SD_CMD, SD_CLK, SD_DATA_0 and SD_DATA_1 are used for connecting
the embedded flash, and are not recommended for other uses.
• For a quick reference guide to using the IO_MUX, Ethernet MAC, and GIPO Matrix pins of ESP32, please refer to
Appendix ESP32 Pin Lists.
• In most cases, the data port connection between the ESP32 and external flash is as follows: SD_DATA0/SPIQ =
IO1/DO, SD_DATA1/SPID = IO0/DI, SD_DATA2/SPIHD = IO3/HOLD#, SD_DATA3/SPIWP = IO2/WP#.
Espressif Systems 8 ESP32 Datasheet V3.0