Добавил:
ИВТ (советую зайти в "Несортированное") Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
interfeysy_1 / ИДЗ_машинка / даташиты / esp32_technical_reference_manual_en.pdf
Скачиваний:
13
Добавлен:
26.01.2024
Размер:
9.62 Mб
Скачать

4 IO_MUX and GPIO Matrix (GPIO, IO_MUX)

3.RTC IO_MUX is used to connect GPIO pads to their low-power and analog functions. Only a subset of GPIO pads have these optional ”RTC” functions.

See Section 4.11 for a list of RTC IO_MUX functions.

4.2Peripheral Input via GPIO Matrix

4.2.1Summary

To receive a peripheral input signal via the GPIO Matrix, the GPIO Matrix is configured to source the peripheral signal’s input index (0-18, 23-36, 39-58, 61-90, 95-124, 140-155, 164-181, 190-195, 198-206) from one of the 34 GPIOs (0-19, 21-23, 25-27, 32-39).

The input signal is read from the GPIO pad through the IO_MUX. The IO_MUX must be configured to set the chosen pad to ”GPIO” function. This causes the GPIO pad input signal to be routed into the GPIO Matrix, which in turn routes it to the selected peripheral input.

4.2.2Functional Description

Figure 4-2 shows the logic for input selection via GPIO Matrix.

Figure 4­2. Peripheral Input via IO_MUX, GPIO Matrix

To read GPIO pad X into peripheral signal Y, follow the steps below:

1.Configure the GPIO_FUNCy_IN_SEL_CFG register corresponding to peripheral signal Y in the GPIO Matrix:

Set GPIO_SIGy_IN_SEL to enable peripheral signal input via GPIO matrix.

Set the GPIO_FUNCy_IN_SEL field in this register, corresponding to the GPIO pad X to read from.

2.Configure the GPIO_FUNCx_OUT_SEL_CFG register and clear the GPIO_ENABLE_DATA[x] field corresponding to GPIO pad X in the GPIO Matrix:

Set the GPIO_FUNCx_OEN_SEL bit in the GPIO_FUNCx_OUT_SEL_CFG register to force the pin’s output state to be determined always by the GPIO_ENABLE_DATA[x] field.

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.

Espressif Systems

49

ESP32 TRM (Version 5.0)

Submit Documentation Feedback

Соседние файлы в папке даташиты