Page 1 of 1

ESP32­-PICO­-MINI­-02U and Ethernet: MDIO, MDC, and REFCLK?

Posted: Wed Feb 28, 2024 3:25 pm
by j22715
I'm trying to make a schematic with a LAN8720A PHY chip and the ESP32­-PICO­-MINI­-02U module. RMII - reduced media-independent interface between the two devices.

Some of the pin names on the ESP look to correspond directly with what's on the 8720 chip:
- EMAX_TXD0 -- TXD0
- EMAC_TX_EN -- TXEN
- EMAC_TXD1 -- TXD1
- EMAC_RXD0 -- RXD0
- EMAC_RXD1 -- RXD1
- EMAC_RX_DV -- CRS_DV

I've still got MDIO (management data), MDC (management data clock), and REFCLK (50MHz). There are several "EMAC" pins left on the ESP module, but none of the names line up to these.
I found one Reddit post saying that MDC and MDIO can be stashed on any GPIO pin and then be handled by the firmware redirects, though I've also read that some pins are shared by some internal functions of the ESP module.
What about the 50MHz clock? Can that also go on any GPIO pin?

Re: ESP32­-PICO­-MINI­-02U and Ethernet: MDIO, MDC, and REFCLK?

Posted: Mon Mar 04, 2024 9:08 am
by ESP_ondrej

Re: ESP32­-PICO­-MINI­-02U and Ethernet: MDIO, MDC, and REFCLK?

Posted: Mon Mar 04, 2024 2:17 pm
by j22715
Thank you.
The one link lists GPIO18 for MDIO, and GPIO23 for MDC.

This module doesn't have either of those GPIOs. But if I'm reading that page right, those two signals should be reassignable to any available GPIO pin.

Re: ESP32­-PICO­-MINI­-02U and Ethernet: MDIO, MDC, and REFCLK?

Posted: Tue Mar 05, 2024 8:05 am
by ESP_ondrej
Yes, MDIO and MDC can be assigned to any GPIO which is output capable (check ESP32 TRM) via GPIO matrix. Also be careful with pins which are used as bootstrap pins (check datasheet).