4 IO_MUX and GPIO Matrix (GPIO, IO_MUX)
4 IO_MUX and GPIO Matrix (GPIO, IO_MUX)
4.1 Overview
The ESP32 chip features 34 physical GPIO pads. Each pad can be used as a general-purpose I/O, or be
connected to an internal peripheral signal. The IO_MUX, RTC IO_MUX and the GPIO matrix are responsible
for routing signals from the peripherals to GPIO pads. Together these systems provide highly configurable
I/O.
Note that the I/O GPIO pads are 0-19, 21-23, 25-27, 32-39, while the output GPIOs are 0-19, 21-23, 25-27,
32-33. GPIO pads 34-39 are input-only.
GPIO 20 serves as a valid input and output only on ESP32-PICO-V3 and ESP32-PICO-V3-02. Please refer to
ESP32-PICO Series Datasheet
This chapter describes the signal selection and connection between the digital pads (FUN_SEL, IE, OE, WPU,
WDU, etc.), 162 peripheral input and 176 output signals (control signals: SIG_IN_SEL, SIG_OUT_SEL, IE, OE,
etc.), fast peripheral input/output signals (control signals: IE, OE, etc.), and RTC IO_MUX.
1. The IO_MUX contains one register per GPIO pad. Each pad can be configured to perform a "GPIO" function
(when connected to the GPIO Matrix) or a direct function (bypassing the GPIO Matrix). Some high-speed
digital functions (Ethernet, SDIO, SPI, JTAG, UART) can bypass the GPIO Matrix for better high-frequency
digital performance. In this case, the IO_MUX is used to connect these pads directly to the peripheral.)
See Section
4.10
for a list of IO_MUX functions for each I/O pad.
2. The GPIO Matrix is a full-switching matrix between the peripheral input/output signals and the pads.
• For input to the chip: Each of the 162 internal peripheral inputs can select any GPIO pad as the input
source.
• For output from the chip: The output signal of each of the 34 GPIO pads can be from one of the 176
Espressif Systems
for more information.
Figure 4-1. IO_MUX, RTC IO_MUX and GPIO Matrix Overview
Submit Documentation Feedback
49
ESP32 TRM (Version 5.2)
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?