GPIO Matrix Routing

DrMickeyLauer
Posts: 179
Joined: Sun May 22, 2022 2:42 pm

GPIO Matrix Routing

Postby DrMickeyLauer » Mon Dec 11, 2023 1:25 pm

I'm talking to a peripheral chip via SPI. It also has an INT that is connected to one of my ESP32(S3) GPIOs to signalize certain state changes. In addition to handling the IRQs from this GPIO, can I also wire the GPIO matrix in a way that another GPIO gets set to the inverted level? I have picked up references to the `gpio_matrix` functions, but I'm not sure whether they allow what I'm trying to do.

The net output should be that -- without writing code in the IRQ handler -- a LED gets lit whenever the IRQ line is LOW.

User avatar
ok-home
Posts: 116
Joined: Sun May 02, 2021 7:23 pm
Location: Russia Novosibirsk
Contact:

Re: GPIO Matrix Routing

Postby ok-home » Mon Dec 11, 2023 3:27 pm

hi

Yes, it can be done
There is a range of peripheral output signals (208 ~ 212 in Table 6-2) which are not connected to any peripheral, but to the
input signals (208 ~ 212) directly. These can be used to input a signal from one GPIO pin and output directly to another
GPIO pin.
https://www.espressif.com/sites/default ... ual_en.pdf
page 464

TomAatjes
Posts: 4
Joined: Mon Dec 18, 2023 11:08 am

Re: GPIO Matrix Routing

Postby TomAatjes » Fri Feb 14, 2025 11:56 am

Did anyone actually try this?

The following does not work:
gpio_iomux_in(GPIO_BTN, SIG_IN_FUNC_208_IDX);
gpio_iomux_out(GPIO_LED1, SIG_IN_FUNC208_IDX, false);

ESP32-S3 apparently does not have gpio_matrix()

MicroController
Posts: 2045
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: GPIO Matrix Routing

Postby MicroController » Fri Feb 14, 2025 9:04 pm

You may have to manually enable the output for the LED pin after calling gpio_iomux_out(...).

Who is online

Users browsing this forum: No registered users and 134 guests