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

bkausbk
Posts: 1
Joined: Sun Dec 29, 2019 10:05 pm

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

Postby bkausbk » Sun Dec 29, 2019 10:36 pm

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 5085 times
c224f30e-c8e9-4889-97da-b5d5840bd421.png
c224f30e-c8e9-4889-97da-b5d5840bd421.png (70.16 KiB) Viewed 5085 times

phatpaul
Posts: 110
Joined: Fri Aug 24, 2018 1:14 pm

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

Postby phatpaul » Mon Jan 06, 2020 10:46 pm

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.

lolo633
Posts: 1
Joined: Fri Jul 24, 2020 9:34 am

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

Postby lolo633 » Wed Jul 29, 2020 5:26 pm

As anyone been able to make it work with the 25MHz crystal? Im having the same problem

Who is online

Users browsing this forum: No registered users and 139 guests