Hi,
I have to use the function
esp_rom_gpio_connect_out_signal
to combine two signals. There is no real documentation for this function. In esp_rom_gpio.h it just says "Combine a peripheral signal which tagged as output attribute with a GPIO. There's no limitation on the number of signals that a GPIO can combine with."
How can I undo this connection? I do not want to reset all the config for this GPIO. Just undo what esp_rom_gpio_connect_out_signal did.
Undo esp_rom_gpio_connect_out_signal
Undo esp_rom_gpio_connect_out_signal
ESP32 / ESP-IDF 5.1.4
-
- Posts: 1729
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Undo esp_rom_gpio_connect_out_signal
If by 'undo' you mean disconnect the signal's output from the pad and the input, I believe setting the direction/"mode" to input (or, not-output) should be sufficient. I say 'believe' because the ESP32 TRM isn't too clear about it, while in the ESP32-S3's TRM we can see the workings of the the OE signal. Not sure if ESP32 and S3 differ in that regard. But trying it out shouldn't cause any harm
Re: Undo esp_rom_gpio_connect_out_signal
I mean the exact same state as just before executing esp_rom_gpio_connect_out_signal(). The GPIOs are involved in a bus initialization (ESP-IDF API) I do not want to re-initialize the bus over and over again.
ESP32 / ESP-IDF 5.1.4
-
- Posts: 1729
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Undo esp_rom_gpio_connect_out_signal
Start by reconnecting the signal that was connected before you called esp_rom_gpio_connect_out_signal().
Re: Undo esp_rom_gpio_connect_out_signal
That is the mystery. It is the MOSI pin, the one called mosi_io_num in spi_bus_config_t.
ESP32 / ESP-IDF 5.1.4
-
- Posts: 1729
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Undo esp_rom_gpio_connect_out_signal
You can draw inspiration from spicommon_bus_initialize_io(), or you can read the currently connected signal (MCU_SEL) from the corresponding IOMUX register before rerouting it.
Who is online
Users browsing this forum: Bing [Bot] and 129 guests