Chapter 3. Schematic Checklist
3.8 GPIO
The pins of ESP32 can be configured via IO MUX or GPIO matrix. IO MUX provides the default pin configurations,
whereas the GPIO matrix is used to route signals from peripherals to GPIO pins. For more information about IO
MUX and GPIO matrix, please refer to
Some peripheral signals have already been routed to certain GPIO pins, while some can be routed to any available
GPIO pins. For details, please refer to
When using GPIOs, please:
• Pay attention to the states of strapping pins during power-up.
• Pay attention to the default configurations of the GPIOs after reset. The default configurations can be found
in Table
IO MUX Pin
high-impedance state or enable the pull-up and pull-down during software initialization to avoid extra power
consumption.
• Avoid using the pins already occupied by flash/PSRAM.
GPIO
Pin
Func-
Name
tion
0
0
GPIO0
GPIO0
1
U0TXD
U0TXD
2
GPIO2
GPIO2
3
U0RXD
U0RXD
4
GPIO4
GPIO4
5
GPIO5
GPIO5
6
SD_CLK SD_CLK SPI-
7
SD_DATA_0 SD_DATA0 S PIQ
8
SD_DATA_1 SD_DATA1 S PID
9
SD_DATA_2 SD_DATA2 S PIHD
10
SD_DATA_3 SD_DATA3 S PIWP
11
SD_CMD SD_CMD SPICS0
12
MTDI
MTDI
13
MTCK
MTCK
14
MTMS
MTMS
15
MTDO
MTDO
16
GPIO16
GPIO16
17
GPIO17
GPIO17
18
GPIO18
GPIO18
19
GPIO19
GPIO19
21
GPIO21
GPIO21
22
GPIO22
GPIO22
23
GPIO23
GPIO23
25
GPIO25
GPIO25
26
GPIO26
GPIO26
27
GPIO27
GPIO27
32
32K_XP GPIO32
33
32K_XN GPIO33
34
VDET_1 GPIO34
35
VDET_2 GPIO35
Espressif Systems
ESP32 Technical Reference Manual
ESP32 Series Datasheet
Functions. It is recommended to add a pull-up or pull-down resistor to pins in the
Table 6: IO MUX Pin Functions
Func-
Func-
tion
tion
1
2
CLK_OUT1 G PIO0
CLK_OUT3 G PIO1
HSPIWP GPIO2
CLK_OUT2 G PIO3
HSPIHD GPIO4
VSPICS0 GPIO5
GPIO6
CLK
GPIO7
GPIO8
GPIO9
GPIO10
GPIO11
HSPIQ
GPIO12
HSPID
GPIO13
HSPI-
GPIO14
CLK
HSPICS0 GPIO15
–
GPIO16
–
GPIO17
VSPI-
GPIO18
CLK
VSPIQ
GPIO19
VSPIHD GPIO21
VSPIWP GPIO22
VSPID
GPIO23
–
GPIO25
–
GPIO26
–
GPIO27
–
GPIO32
–
GPIO33
–
GPIO34
–
GPIO35
Submit Document Feedback
> Chapter IO MUX and GPIO Matrix.
> Section Peripheral Pin Configurations.
Func-
Func-
Func-
tion
tion
tion
3
4
5
–
–
EMAC_TX_CLK
–
–
EMAC_RXD2
HS2_DATA0 SD_DATA0 –
–
–
–
HS2_DATA1 SD_DATA1 E MAC_TX_ER
HS1_DATA6 –
EMAC_RX_CLK
HS1_CLK U1CTS
–
HS1_DATA0 U2RTS
–
HS1_DATA1 U2CTS
–
HS1_DATA2 U1RXD
–
HS1_DATA3 U1TXD
–
HS1_CMDU1RTS
–
HS2_DATA2 SD_DATA2 E MAC_TXD3
HS2_DATA3 SD_DATA3 E MAC_RX_ER
HS2_CLK SD_CLK EMAC_TXD2
HS2_CMDSD_CMD EMAC_RXD3
HS1_DATA4 U2RXD
EMAC_CLK_OUT
HS1_DATA5 U2TXD
EMAC_CLK_180
HS1_DATA7 –
–
U0CTS
–
EMAC_TXD0
–
–
EMAC_TX_EN
U0RTS
–
EMAC_TXD1
HS1_STROBE
–
–
–
–
EMAC_RXD0
–
–
EMAC_RXD1
–
–
EMAC_RX_DV
–
–
–
–
–
–
–
–
–
–
–
–
18
Reset
3
3
2
3
2
3
3
3
3
3
3
3
2
2
3
3
1
1
1
1
1
1
1
0
0
0
0
0
0
0
continues on next page
Release master
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?
Questions and answers