ESP-WROOM-32 with ETH_Lan8720

zekageri
Posts: 43
Joined: Mon Sep 03, 2018 11:04 am

ESP-WROOM-32 with ETH_Lan8720

Postby zekageri » Mon Sep 03, 2018 11:11 am

Hello guys!
I have a problem with esp-Wroom-32 with ETH_Lan8720 board. I'am using an arduino example code from here :

https://github.com/espressif/arduino-es ... AN8720.ino

I did the wireing like this:

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

from the site :
https://sautter.com/blog/ethernet-on-es ... g-lan8720/

I soldered the NC PIN on the lan8720 board to the enable pin of the oscillator. I added pull down resistor to nc pin and pull up to gpio00.

LAN 8720 board : https://fr.aliexpress.com/item/Smart-El ... 6c370I7nRH

ESP32: https://fr.aliexpress.com/item/ESP-WROO ... 6c37H4la82

I get the following errors:

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:952
load:0x40078000,len:6084
load:0x40080000,len:7936
entry 0x40080310
E (2256) emac: Timed out waiting for PHY register 0x2 to have value 0x0007 (mask 0xffff). Current value 0x0000
E (3256) emac: Timed out waiting for PHY register 0x3 to have value 0xc0f0 (mask 0xfff0). Current value 0x0000
E (4256) emac: Timed out waiting for PHY register 0x2 to have value 0x0007 (mask 0xffff). Current value 0x0000

I dont know what to do , can anyone help me?

Dmitry_Kostyuchenko
Posts: 1
Joined: Tue Nov 20, 2018 8:19 am

Re: ESP-WROOM-32 with ETH_Lan8720

Postby Dmitry_Kostyuchenko » Tue Nov 20, 2018 8:26 am

Did you manage to solve this problem? I get the same result.
My Board: MN-ET LEVE Esp32DevKIT.

Rumpelstill
Posts: 1
Joined: Sun Dec 30, 2018 7:10 pm

Re: ESP-WROOM-32 with ETH_Lan8720

Postby Rumpelstill » Sun Dec 30, 2018 7:17 pm

Hi Guys,

its because the Pins are not correct assigned. Using Franks Sautter wiring, run the ETH_LAN9720_internal_clock example (you can also run the other one, but you need to include the defines anyway). Using the Arduino IDE...

Here are my defines to make it work:
#define ETH_CLK_MODE ETH_CLOCK_GPIO0_IN

// Pin# of the enable signal for the external crystal oscillator (-1 to disable for internal APLL source)
#define ETH_POWER_PIN 17

// Type of the Ethernet PHY (LAN8720 or TLK110)
#define ETH_TYPE ETH_PHY_LAN8720

// I²C-address of Ethernet PHY (0 or 1 for LAN8720, 31 for TLK110)
#define ETH_ADDR 1

// Pin# of the I²C clock signal for the Ethernet PHY
#define ETH_MDC_PIN 23

// Pin# of the I²C IO signal for the Ethernet PHY
#define ETH_MDIO_PIN 18

The out of the box values are not working. After changing the settings, all is running fine. Hope this will also work for you.

Mike.

joelparker
Posts: 5
Joined: Thu Feb 14, 2019 3:32 pm

Re: ESP-WROOM-32 with ETH_Lan8720

Postby joelparker » Thu Feb 14, 2019 3:47 pm

I followed the same procedure as the original poster (zekageri) and I am getting the same error:

Code: Select all

emac: : Timed out waiting for PHY register 0x2 to have value 0x2000(mask 0xffff). Current value 0x0007
emac: : Timed out waiting for PHY register 0x3 to have value 0xa210mask 0xfff0). Current value 0xc0f1
Unlike Rumpelstill, I am not using an arduino but flashing the chip directly following the example code:

https://github.com/espressif/esp-idf/tr ... t/ethernet

Does anyone how to fix this issue ? I have set

Code: Select all

Ethernet PHY option to 1
when running

Code: Select all

make menuconfig
and have checked my wiring multiple times. If this is a pin mismatch like Rumpelstill has pointed out; what do I need to change in the C code to fix the issue ?

Who is online

Users browsing this forum: No registered users and 66 guests