Download Print this page

Espressif ESP32 Technical Reference Manual page 52

Hide thumbs Also See for ESP32:

Advertisement

4 IO_MUX and GPIO Matrix (GPIO, IO_MUX)
Note:
The peripheral output signals 224 to 228 can be configured to be routed in from one GPIO and output directly from
another GPIO.
4.3.2 Functional Description
One of the 176 output signals can be selected to go through the GPIO matrix into the IO_MUX and then to a
pad. Figure
4-3
illustrates the configuration.
In GPIO matrix
signal0_out
signal1_out
signal2_out
signal3_out
signal228_out
GPIO_OUT_DATA bit x
To output peripheral signal
1. Configure the GPIO_FUNCx_OUT_SEL_CFG register and GPIO_ENABLE_DATA[x] field corresponding to
GPIO
X
in the GPIO Matrix:
• Set the GPIO_FUNCx_OUT_SEL field in GPIO_FUNCx_OUT_SEL_CFG to the numeric index (Y) of de-
sired peripheral output signal Y.
• If the signal should always be enabled as an output, set the GPIO_FUNCx_OEN_SEL bit in the
GPIO_FUN
Cx_OUT_SEL_CFG register and the GPIO_ENABLE_DATA[x] field in the GPIO_ENABLE_REG register
corresponding to GPIO pad X. To have the output enable signal decided by internal logic, clear the
GPIO_FUNCx_OEN_SEL bit instead.
• The GPIO_ENABLE_DATA[x] field is a bit in either GPIO_ENABLE_REG (GPIOs 0-31) or GPIO_ENABLE1
_REG (GPIOs 32-39). Clear this bit to disable the output driver for the GPIO pad.
2. For an open drain output, set the GPIO_PINx_PAD_DRIVER bit in the
GPIO pad X. For push/pull mode (default), clear this bit.
3. Configure the IO_MUX to select the GPIO Matrix. Set the IO_MUX_x_REG register corresponding to GPIO
pad
X
as follows:
• Set the function field (MCU_SEL) to the IO_MUX function corresponding to GPIO
2—numeric value 2—for all pins).
Espressif Systems
GPIO_FUNCx_OUT_SEL
0
1
2
3
228
256 (0x100)
256sdfsdfasdfgas
Figure 4-3. Output via GPIO Matrix
Y
to particular GPIO pad X, follow these steps:
Submit Documentation Feedback
In IO MUX
GPIO X out
GPIOx_out
FUN_OE = 1
GPIO_PINx
52
MCU_SEL
0 (FUNC)
1 (FUNC)
I/O Pad x
2 (GPIO)
register corresponding to
X
(this is Function
ESP32 TRM (Version 5.2)

Advertisement

loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?