ESP32-Ethernet Kit

sidprice
Posts: 16
Joined: Sat Jan 09, 2021 10:20 pm

ESP32-Ethernet Kit

Postby sidprice » Sun May 15, 2022 9:41 pm

Is the ESP32-Ethernet Kit V1 supported in the Arduino IDE/Framework? I don't seem to be able to find that board.
Sid

lbernstone
Posts: 829
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP32-Ethernet Kit

Postby lbernstone » Mon May 16, 2022 3:56 am

You can just use the ESP32 Dev Module. The gpio assignments are well documented at https://docs.espressif.com/projects/esp ... allocation

sidprice
Posts: 16
Joined: Sat Jan 09, 2021 10:20 pm

Re: ESP32-Ethernet Kit

Postby sidprice » Mon May 16, 2022 1:08 pm

I will give that a try :)

Thank you, Sid

sidprice
Posts: 16
Joined: Sat Jan 09, 2021 10:20 pm

Re: ESP32-Ethernet Kit

Postby sidprice » Mon May 16, 2022 9:48 pm

Using the ESP32-DevKit as the board selection in Arduino I am now trying to use the ETH_TLK110 example sketch. At the beginning of the sketch are a number of definitions for the Ethernet PHY. Referring to the ESP32-Ethernet Kit "Getting started" guide I see the GPIO definitions for the "MDC" and "MDIO" connections. However, there are other definitions that I cannot find any reference to in the guide:

Code: Select all

#define ETH_ADDR        31
#define ETH_POWER_PIN   17
#define ETH_MDC_PIN     23
#define ETH_MDIO_PIN    18
#define ETH_TYPE        ETH_PHY_TLK110
Could someone help me get those definitions correct please.

With the above setting, when I upload the sketch to the hardware I see the following:

Code: Select all

E (1028) esp.emac: emac_esp32_init(354): reset timeout
E (1028) esp_eth: esp_eth_driver_install(221): init mac failed

lbernstone
Posts: 829
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP32-Ethernet Kit

Postby lbernstone » Mon May 16, 2022 10:57 pm

I don't know what the phy address is, that is specific to the phy device, but it seems likely that the example is correct. The power pin (reset) is gpio 5. gpio17 is used by psram on a wrover.

sidprice
Posts: 16
Joined: Sat Jan 09, 2021 10:20 pm

Re: ESP32-Ethernet Kit

Postby sidprice » Mon May 16, 2022 11:53 pm

I changed the definitions with slightly different result:

Code: Select all

#define ETH_ADDR        31
#define ETH_POWER_PIN   5
#define ETH_MDC_PIN     23
#define ETH_MDIO_PIN    18
#define ETH_TYPE        ETH_PHY_TLK110
Now I see:

Code: Select all

E (138) ip101: ip101_pwrctl(295): power up timeout
E (138) ip101: ip101_init(358): power control failed
E (138) esp_eth: esp_eth_driver_install(222): init phy failed
I don't understand why this is such a mystery, it is an Espressif board after all.

lbernstone
Posts: 829
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP32-Ethernet Kit

Postby lbernstone » Tue May 17, 2022 1:02 am

Yes, it is an Espressif board, and if you use the recommended example at https://github.com/espressif/esp-idf/tr ... rnet/basic it would work out of the box.
But, there's more than one way to set it up :)
Looking at the example, they do not set the refclk source. I think you should be sourcing from the phy, so

Code: Select all

  ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLOCK_GPIO0_IN);
I don't have one with me (although I do have one somewhere in deep storage), so I can't actually test it myself. If that doesn't do it, try setting the address to 0 or 1. The pins all look correct.

sidprice
Posts: 16
Joined: Sat Jan 09, 2021 10:20 pm

Re: ESP32-Ethernet Kit

Postby sidprice » Sat May 21, 2022 4:05 pm

I did find an Espressif example for this board in the IDF repository, "eth2ap". It does exactly what I want :D

Who is online

Users browsing this forum: Baidu [Spider] and 59 guests