Answers checklist.
General issue report
I tried to save the crystal cost ( 25MHZ ) for the IP101GR, by letting esp32-p4 generate that clock.
In doc its no indication this would now work.
But:
The MPLL (Media PLL) is already being used by something else at 400MHz, and the EMAC clock output mode requires exclusive use of the MPLL to generate the 50MHz RMII clock. This is a resource conflict.
On the ESP32-P4, the MPLL is a shared resource used by both the EMAC and potentially PSRAM or other peripherals. Looking at your sdkconfig:
CONFIG_SPIRAM_SPEED_200M=y
CONFIG_SPIRAM_MODE_HEX=y
Your PSRAM is running at 200MHz, which requires the MPLL running at 400MHz — exactly what the error message shows. This is the conflict.
The conclusion is that on your ESP32-P4, you cannot use RMII clock output mode simultaneously with 200MHz PSRAM, because both require the MPLL.
Your options are:
Keep the current working setup — revert to CONFIG_ETHERNET_PHY_INTERFACE_DEFAULT and keep the IP101GR outputting the clock. This is what was working before.
Reduce PSRAM speed — change to CONFIG_SPIRAM_SPEED_80M which may free the MPLL, but this will significantly impact performance.
Keep the crystal on the IP101GR for future board revisions where this constraint is documented.
W (2421) esp.emac: MPLL is occupied already, it is working at 400000000 HzI (2421) wifi station:
Initializing esp-hosted...E (2431) esp.emac:
emac_esp_config_data_interface(803): invalid EMAC input of output clock mode
I (2431) H_API: ESP-Hosted Try to communicate with ESP-Hosted slave
E (2441) esp.emac:
esp_eth_mac_new_esp32(984): config emac interface failedI (2451) transport:
Attempt connection with slave: retry[0]
E (2451) esp_eth: esp_eth_driver_install(209): can't set eth->mac or eth->phy to nullW (2461) H_SDIO_DRV:
Reset slave using GPIO[54]E (2471) ethernet_init:
eth_init_internal(325): Ethernet driver install failedI (2471) os_wrapper_esp:
GPIO [54] configured
E (2481) ethernet_init: ethernet_init_all(570): internal Ethernet init failed
I (2491) ethernet_init: All Ethernet devices were deinitialized
ESP_ERROR_CHECK failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x4002bdf2
--- 0x4002bdf2: init_ethernet at C:/workspace/batteries-chargers/esp32/ch1_p4_6/main/ac_ethernet.c:135
file: "./main/ac_ethernet.c" line 135
func: init_ethernet
expression: ethernet_init_all(ð_handles, ð_port_cnt)
abort() was called at PC 0x4ff0efc3 on core 0
--- 0x4ff0efc3: _esp_error_check_failed at C:/esp/v6.0/esp-idf/components/esp_system/esp_err.c:49
--- Stack dump detected
Core 0 register dump:
MEPC : 0x4ff0f01a RA : 0x4ff0efcc SP : 0x4ff36420 GP : 0x4ff17180
--- 0x4ff0f01a: panic_abort at C:/esp/v6.0/esp-idf/components/esp_system/panic.c:473
--- 0x4ff0efcc: esp_vApplicationTickHook at C:/esp/v6.0/esp-idf/components/esp_system/freertos_hooks.c:31
TP : 0x4ff36650 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x00000004 S1 : 0x4ff36484 A0 : 0x4ff3644c A1 : 0x4ff36482
A2 : 0x00000000 A3 : 0x4ff36479 A4 : 0x00000001 A5 : 0x4ff29000
A6 : 0x00000000 A7 : 0x76757473 S2 : 0x00000000 S3 : 0x00000000
S4 : 0x00000000 S5 : 0x00000000 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00011880 MTVEC : 0x4ff00003 MCAUSE : 0x00000002 MTVAL : 0x00000000
--- 0x4ff00003: _vector_table at ??:?
MHARTID : 0x00000000
--- Backtrace:
add symbol table from file "C:\workspace\batteries-chargers\esp32\ch1_p4_6\build\bootloader\bootloader.elf"
warning: could not convert 'main' from the host encoding (CP1252) to UTF-32.
This normally should not happen, please file a bug report.
panic_abort (details=details@entry=0x4ff3644c "abort() was called at PC 0x4ff0efc3 on core 0") at C:/esp/v6.0/esp-idf/components/esp_system/panic.c:473
473 asm("unimp"); // should be an invalid operation on RISC-V targets
#0 panic_abort (details=details@entry=0x4ff3644c "abort() was called at PC 0x4ff0efc3 on core 0") at C:/esp/v6.0/esp-idf/components/esp_system/panic.c:473
#1 0x4ff0efcc in esp_system_abort (details=details@entry=0x4ff3644c "abort() was called at PC 0x4ff0efc3 on core 0") at C:/esp/v6.0/esp-idf/components/esp_system/port/esp_system_chip.c:87
#2 0x4ff0c3ca in abort () at C:/esp/v6.0/esp-idf/components/esp_libc/src/abort.c:38
#3 0x4ff0efc6 in _esp_error_check_failed (rc=, file=file@entry=0x40123688 "", line=line@entry=135, function=function@entry=0x4016945c <func.0> "", expression=expression@entry=0x40123658 "") at C:/esp/v6.0/esp-idf/components/esp_system/esp_err.c:49
#4 0x4002bdf6 in init_ethernet () at C:/workspace/batteries-chargers/esp32/ch1_p4_6/main/ac_ethernet.c:135
#5 0x40028d0a in app_main () at C:/workspace/batteries-chargers/esp32/ch1_p4_6/main/ch1_main.c:730
#6 0x00000000 in ?? ()
Backtrace stopped: frame did not save the PC
Answers checklist.
General issue report
I tried to save the crystal cost ( 25MHZ ) for the IP101GR, by letting esp32-p4 generate that clock.
In doc its no indication this would now work.
But:
The MPLL (Media PLL) is already being used by something else at 400MHz, and the EMAC clock output mode requires exclusive use of the MPLL to generate the 50MHz RMII clock. This is a resource conflict.
On the ESP32-P4, the MPLL is a shared resource used by both the EMAC and potentially PSRAM or other peripherals. Looking at your sdkconfig:
CONFIG_SPIRAM_SPEED_200M=y
CONFIG_SPIRAM_MODE_HEX=y
Your PSRAM is running at 200MHz, which requires the MPLL running at 400MHz — exactly what the error message shows. This is the conflict.
The conclusion is that on your ESP32-P4, you cannot use RMII clock output mode simultaneously with 200MHz PSRAM, because both require the MPLL.
Your options are:
Keep the current working setup — revert to CONFIG_ETHERNET_PHY_INTERFACE_DEFAULT and keep the IP101GR outputting the clock. This is what was working before.
Reduce PSRAM speed — change to CONFIG_SPIRAM_SPEED_80M which may free the MPLL, but this will significantly impact performance.
Keep the crystal on the IP101GR for future board revisions where this constraint is documented.
W (2421) esp.emac: MPLL is occupied already, it is working at 400000000 HzI (2421) wifi station:
Initializing esp-hosted...E (2431) esp.emac:
emac_esp_config_data_interface(803): invalid EMAC input of output clock mode
I (2431) H_API: ESP-Hosted Try to communicate with ESP-Hosted slave
E (2441) esp.emac:
esp_eth_mac_new_esp32(984): config emac interface failedI (2451) transport:
Attempt connection with slave: retry[0]
E (2451) esp_eth: esp_eth_driver_install(209): can't set eth->mac or eth->phy to nullW (2461) H_SDIO_DRV:
Reset slave using GPIO[54]E (2471) ethernet_init:
eth_init_internal(325): Ethernet driver install failedI (2471) os_wrapper_esp:
GPIO [54] configured
E (2481) ethernet_init: ethernet_init_all(570): internal Ethernet init failed
I (2491) ethernet_init: All Ethernet devices were deinitialized
ESP_ERROR_CHECK failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x4002bdf2
--- 0x4002bdf2: init_ethernet at C:/workspace/batteries-chargers/esp32/ch1_p4_6/main/ac_ethernet.c:135
file: "./main/ac_ethernet.c" line 135
func: init_ethernet
expression: ethernet_init_all(ð_handles, ð_port_cnt)
abort() was called at PC 0x4ff0efc3 on core 0
--- 0x4ff0efc3: _esp_error_check_failed at C:/esp/v6.0/esp-idf/components/esp_system/esp_err.c:49
--- Stack dump detected
Core 0 register dump:
MEPC : 0x4ff0f01a RA : 0x4ff0efcc SP : 0x4ff36420 GP : 0x4ff17180
--- 0x4ff0f01a: panic_abort at C:/esp/v6.0/esp-idf/components/esp_system/panic.c:473
--- 0x4ff0efcc: esp_vApplicationTickHook at C:/esp/v6.0/esp-idf/components/esp_system/freertos_hooks.c:31
TP : 0x4ff36650 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x00000004 S1 : 0x4ff36484 A0 : 0x4ff3644c A1 : 0x4ff36482
A2 : 0x00000000 A3 : 0x4ff36479 A4 : 0x00000001 A5 : 0x4ff29000
A6 : 0x00000000 A7 : 0x76757473 S2 : 0x00000000 S3 : 0x00000000
S4 : 0x00000000 S5 : 0x00000000 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00011880 MTVEC : 0x4ff00003 MCAUSE : 0x00000002 MTVAL : 0x00000000
--- 0x4ff00003: _vector_table at ??:?
MHARTID : 0x00000000
--- Backtrace:
add symbol table from file "C:\workspace\batteries-chargers\esp32\ch1_p4_6\build\bootloader\bootloader.elf"
warning: could not convert 'main' from the host encoding (CP1252) to UTF-32.
This normally should not happen, please file a bug report.
panic_abort (details=details@entry=0x4ff3644c "abort() was called at PC 0x4ff0efc3 on core 0") at C:/esp/v6.0/esp-idf/components/esp_system/panic.c:473
473 asm("unimp"); // should be an invalid operation on RISC-V targets
#0 panic_abort (details=details@entry=0x4ff3644c "abort() was called at PC 0x4ff0efc3 on core 0") at C:/esp/v6.0/esp-idf/components/esp_system/panic.c:473
#1 0x4ff0efcc in esp_system_abort (details=details@entry=0x4ff3644c "abort() was called at PC 0x4ff0efc3 on core 0") at C:/esp/v6.0/esp-idf/components/esp_system/port/esp_system_chip.c:87
#2 0x4ff0c3ca in abort () at C:/esp/v6.0/esp-idf/components/esp_libc/src/abort.c:38
#3 0x4ff0efc6 in _esp_error_check_failed (rc=, file=file@entry=0x40123688 "", line=line@entry=135, function=function@entry=0x4016945c <func.0> "", expression=expression@entry=0x40123658 "") at C:/esp/v6.0/esp-idf/components/esp_system/esp_err.c:49
#4 0x4002bdf6 in init_ethernet () at C:/workspace/batteries-chargers/esp32/ch1_p4_6/main/ac_ethernet.c:135
#5 0x40028d0a in app_main () at C:/workspace/batteries-chargers/esp32/ch1_p4_6/main/ch1_main.c:730
#6 0x00000000 in ?? ()
Backtrace stopped: frame did not save the PC