GPIO Matrix

dmrsim
Posts: 24
Joined: Sat Sep 03, 2022 4:52 pm
Location: Italy

GPIO Matrix

Postby dmrsim » Thu Aug 03, 2023 2:48 pm

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?

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

Re: GPIO Matrix

Postby MicroController » Thu Aug 03, 2023 11:01 pm

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.

Who is online

Users browsing this forum: TomAatjes and 82 guests