ESP32 idf v5.5.4 esp_eth_mac_new_esp32() overwrites GPIO0 gpio matrix config
Posted: Fri Jun 26, 2026 8:58 pm
I'm porting a project from idf 4.4.8 to 5.5.4 and ran into problems with the i2s peripheral (using the new driver in full-duplex mode). The data output of i2s (GPIO0 in my case) was always zero, data input and clocks were working ok. It turned out that initializing ethernet after i2s kills the i2s output pin. returns 0xa3 until I call after which it returns 0x23. If I call i2s starts working again.
This is my configuration (with the built-in emac):
I have also selected RMII clock output mode and pin 17 in menuconfig. Ethernet works just fine, it just kills my GPIO0. Am I doing something wrong or is there a bug in idf version 5.5.4?
Thank you.
Code: Select all
REG_READ(GPIO_FUNC0_OUT_SEL_CFG_REG)Code: Select all
esp_eth_mac_new_esp32(&esp32_emac_config, &mac_config);Code: Select all
gpio_matrix_out(0, 0xa3, false, false);This is my configuration (with the built-in emac):
Code: Select all
eth_esp32_emac_config_t esp32_emac_config = ETH_ESP32_EMAC_DEFAULT_CONFIG();
esp32_emac_config.smi_gpio.mdc_num = IO_EMDC; // 23
esp32_emac_config.smi_gpio.mdio_num = IO_EMDIO; // 18
esp32_emac_config.clock_config.rmii.clock_mode = EMAC_CLK_OUT;
esp32_emac_config.clock_config.rmii.clock_gpio = IO_PHY_CLK; // 17
esp_eth_mac_t *mac = esp_eth_mac_new_esp32(&esp32_emac_config, &mac_config);
Thank you.