-->
Page 1 of 1

NodeMCU Ethernet on a WT32-ETH01

PostPosted: Wed Oct 06, 2021 11:19 am
by Sean Phelan
Hi all
The WT32-ETH01 seems to be a nice ESP32 device, complete with an RJ-45 connector and a LAN8720A ethernet chip. I'm trying to get ethernet connectivity working with NodeMCU.

Flashing in the OS was straightforward; I'm now trying to construct a valid eth.init() call.

The WT32-ETH01 schematic shows the mdc and mdio pins as 23 and 18. But I can't find the correct value for 'clock_mode'. The eth.init() call requires one of GPIO0, GPIO16 or GLIO17 as a clock pin and mode selection. But I can't see on the schematic which of those pins is correct, or if it is an input or output.

Does anybody have a WT32-ETH01 running NodeMCU and using Ethernet? Any and all advice welcome :)

Thanks
Sean

Re: NodeMCU Ethernet on a WT32-ETH01 - SOLVED

PostPosted: Thu Oct 14, 2021 11:33 am
by Sean Phelan
OK; a WT32-ETH01 is working for me: networking over ethernet, running NodeMCU.

The LAN8720 uses PHY address 1, so the configuration data for the call to eth.init() is:
Code: Select all{phy=eth.PHY_LAN8720,addr=1,power=16,clock_mode=eth.CLOCK_GPIO0_OUT,mdc=23,mdio=18}


One other issue that held me up for a while: 5V power. I started by powering the device with 5V from the USB-TTL adaptor I was using for a serial console. The ESP32 seemed to be running fine, but I don't think the LAN8720 was. As soon as I started using a separate 5V power supply the LAN8720 started responding and ethernet came up.

Cheers
Sean