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

j22715
Posts: 3
Joined: Wed Feb 28, 2024 2:21 pm

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

Postby j22715 » Wed Feb 28, 2024 3:25 pm

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?


j22715
Posts: 3
Joined: Wed Feb 28, 2024 2:21 pm

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

Postby j22715 » Mon Mar 04, 2024 2:17 pm

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.

ESP_ondrej
Posts: 211
Joined: Fri May 07, 2021 10:35 am

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

Postby ESP_ondrej » Tue Mar 05, 2024 8:05 am

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).

Who is online

Users browsing this forum: No registered users and 135 guests