Page 1 of 1

GPIO Matrix

Posted: Thu Aug 03, 2023 2:48 pm
by dmrsim
I’m using a ESP32-S3-MINI-1U-N8 module.
I would like to switch some peripheral signals to certain GPIO pins using GPIO matrix.
I can’t find any clear documentation or example to do such thing.
I’ve just found the following IDF functions:

Code: Select all

void gpio_iomux_in(uint32_t gpio_num, uint32_t signal_idx);

void gpio_iomux_out(uint8_t gpio_num, int func, bool oen_inv);
But, it’s not clear how to use them properly.

Could you please provide some indications?
For example, would it be possible to switch I/O signal SPID (pin 35) to GPIO39?
Would it be possible to switch O signal SPICS0 (pin 32) to GPIO40?

Re: GPIO Matrix

Posted: Thu Aug 03, 2023 11:01 pm
by MicroController
If you use the respective IDF drivers for the peripherals in question, you can use their API to have them set up signal routing (c.f. e.g. the spi_bus_config_t parameter of spi_bus_initialize(...)).
I think this would be the preferred way to not cause conflicts between any manually set up routing and the routings of which the IDF drivers are aware.