Page 1 of 1

Why is there no REFCLKO on ESP32-WROOM-32 (LAN8720A)

Posted: Sun Dec 29, 2019 10:36 pm
by bkausbk
There is a problem with a board created by me. It uses ESP32-WROOM-32 attached to a LAN8720A. The LAN8720A never produces an output clock on it's pin 14 (nINT/REFCLKO) as expected which is connected to IO0. Pin 2 (LED2/INTSEL) has a pull-down resistor as required. This will create the 50MHz clock from it's 25MHz crystal. Also PHYAD0 (Pin 10) has pull-down resistor (address 0).
I've used latest IDF Master repository from github. I used unmodified exampled/ethernet/basic/ for demonstration purpose. I configured all pins according to desired defaults, including IO17 for PHYPOWER to reset/enable the attached LAN8720A. I tried also to set R11 as pull-up or leaving it at all.

SMI communication seems to be perfect, identification of the device is working, but as soon as the software reset is activated it times out, I suppose since there is no clock on IO0 (EMAC_CLK). This will reset the ESP32-WROOM-32 in an endless loop.
components/esp_eth/src/esp_eth_mac_esp32.c in emac_esp32_init MAC_CHECK(to < emac->sw_reset_timeout_ms / 10, "reset timeout", err, ESP_ERR_TIMEOUT);


The ESP32 module is configured to accept 50MHz input clock on IO0.

The crystal is oscillating with 25MHz as expected. However on XTAL1 the voltage amplitude is only about 1.4V and on XTAL2 it's about 1V. I don't know if this is the expected voltage. I didn't find any information in datasheet about this specification.

Is there any error in the circuit? What could be the problem here?

PS: Programming mode is entered by setting nPROG to HIGH, which is working as expected.
e7500dcd-5bfb-46d8-b210-c2957aee4fde.png
e7500dcd-5bfb-46d8-b210-c2957aee4fde.png (105.23 KiB) Viewed 5082 times
c224f30e-c8e9-4889-97da-b5d5840bd421.png
c224f30e-c8e9-4889-97da-b5d5840bd421.png (70.16 KiB) Viewed 5082 times

Re: Why is there no REFCLKO on ESP32-WROOM-32 (LAN8720A)

Posted: Mon Jan 06, 2020 10:46 pm
by phatpaul
This might not be helpful, but I'm using something close to the schematic here: https://github.com/OLIMEX/ESP32-EVB/tre ... r/HARDWARE

It is using an external crystal oscillator which is connected to LAN8720 pin 5 (CLKIN) and also to ESP32 GPIO0.

I haven't tried to use the internal oscillator of the LAN8720, since it wouldn't save cost and would be more sensitive to outside noise.

Re: Why is there no REFCLKO on ESP32-WROOM-32 (LAN8720A)

Posted: Wed Jul 29, 2020 5:26 pm
by lolo633
As anyone been able to make it work with the 25MHz crystal? Im having the same problem