Replacement for gpio_iomux_out function

SJChannel
Posts: 3
Joined: Sun Jul 19, 2026 7:14 pm

Replacement for gpio_iomux_out function

Postby SJChannel » Sun Jul 19, 2026 7:38 pm

I recently upgraded from ESP-IDF 5.3.1 to 6.0.2. This broke some calls to gpio_iomux_out() that I had used in a project based on the ESP32-PICO-V3-02. The ESP-IDF 6.x Migration Guide mentions the removal of this function, stating:
gpio_iomux_in() and gpio_iomux_out() have been replaced by gpio_iomux_input() and gpio_iomux_output(), and have been moved to esp_private/gpio.h header file as private APIs for internal use only.
The reason I needed gpio_iomux_out() was in order to allow me to use GPIO7 and GPIO8 on the ESP32-PICO-V3-02. The ESP32 PICO Series Datasheet says in Table 8 that these two GPIOs "can be used freely". However, I found that they did not function as outputs. Further investigation revealed that the IOMUX was not set up properly to route GPIO signals to these pins. Hence the need for me to call gpio_iomux_out().

An earlier chip variant, the ESP32-PICO-D4, used GPIO7 and GPIO8 for in-package flash. Apparently the incorrect IOMUX setting was a left-over from that earlier chip.

Is there a way for me to setup the IOMUX as I need without relying on a private API which could go away in the future?

Sprite
Espressif staff
Espressif staff
Posts: 10636
Joined: Thu Nov 26, 2015 4:08 am

Re: Replacement for gpio_iomux_out function

Postby Sprite » Mon Jul 20, 2026 1:07 am

Does gpio_reset_pin() not work?

SJChannel
Posts: 3
Joined: Sun Jul 19, 2026 7:14 pm

Re: Replacement for gpio_iomux_out function

Postby SJChannel » Mon Jul 20, 2026 11:43 am

That is a great suggestion. Thank you! I will test it and will follow up here with the results. My only ESP32 PICO is hardwired into a project, but I ordered another one which should arrive within a day or two.

SJChannel
Posts: 3
Joined: Sun Jul 19, 2026 7:14 pm

Re: Replacement for gpio_iomux_out function

Postby SJChannel » Wed Jul 22, 2026 5:53 pm

I tested using gpio_reset_pin() on the ESP32 PICO, and it does exactly what I need. After calling that function for GPIO_NUM_7 and GPIO_NUM_8, I can use the GPIOs as I/O pins. Thanks again for the help.

Who is online

Users browsing this forum: Amazon [Bot], Google [Bot], Semrush [Bot] and 1 guest