Can I Use GPIO16 as REF_CLK for LAN8720 with ESP32 DevKit V1 if GPIO0 is Unavailable?

Hello everyone, I am currently working on a setup with a LAN8720 and an ESP32 DevKit V1 module. ESP32:
attachment 0
3 Replies
Camila_99$$
Camila_99$$4mo ago
LAN8720 Connection Table:
- GPIO17 - PHY_POWER: NC - Osc. Enable - 4k7 Pulldown
- GPIO22 - EMAC_TXD1: TX1
- GPIO19 - EMAC_TXD0: TX0
- GPIO21 - EMAC_TX_EN: TX_EN
- GPIO26 - EMAC_RXD1: RX1
- GPIO25 - EMAC_RXD0: RX0
- GPIO27 - EMAC_RX_DV: CRS
- GPIO00 - EMAC_TX_CLK: nINT/REFCLK (50MHz) - 4k7 Pullup
- GPIO23 - SMI_MDC: MDC
- GPIO18 - SMI_MDIO: MDIO
- GND: GND
- 3V3: VCC
- GPIO17 - PHY_POWER: NC - Osc. Enable - 4k7 Pulldown
- GPIO22 - EMAC_TXD1: TX1
- GPIO19 - EMAC_TXD0: TX0
- GPIO21 - EMAC_TX_EN: TX_EN
- GPIO26 - EMAC_RXD1: RX1
- GPIO25 - EMAC_RXD0: RX0
- GPIO27 - EMAC_RX_DV: CRS
- GPIO00 - EMAC_TX_CLK: nINT/REFCLK (50MHz) - 4k7 Pullup
- GPIO23 - SMI_MDC: MDC
- GPIO18 - SMI_MDIO: MDIO
- GND: GND
- 3V3: VCC
However, when connecting, I realize that my board does not have a GPIO0 pin. What can I replace it with and how? Can I use GPIO16? Because when reading some documentation, I found this: "REF_CLK can only be selected from GPIO0, GPIO16, or GPIO17." But will it recognize it automatically, or will it need to be configured?
wafa_ath
wafa_ath4mo ago
Hi @Camila_99$$ , Use GPIO16 or GPIO17 instead of GPIO0 for REF_CLK. Set the correct pin in your code with phy_config.clock_mode = ETH_CLOCK_GPIO16_OUT or ETH_CLOCK_GPIO17_OUT to ensure proper configuration; it won't recognize automatically.
Camila_99$$
Camila_99$$4mo ago
Okk thanks Wafa , I was worried about the configuration part, so this really helps. I’ll give it a try with GPIO16
Want results from more Discord servers?
Add your server