Can't TX, ESP32 + LAN8720 with GPIO0 Clock Out

cnlohr
Posts: 25
Joined: Sat Dec 03, 2016 5:39 am

Can't TX, ESP32 + LAN8720 with GPIO0 Clock Out

Postby cnlohr » Thu Jul 05, 2018 4:44 pm

I'm working with a LAN8720, and trying to get it to operate with the ESP32 with GPIO0 out functionality. So far, I've had extremely good luck getting the system to wake up, link, talk to the PHY and receive packets, however, I cannot seem to get the ESP32 to send ANYTHING out the ethernet at all.

I've also tried other clock settings, all have exactly the same symptoms.

I can see the TXEN line going high any time a packet is sent, like DHCP requests, but I get nothing on the other side.

I've modified the example ethernet test program to customize bootstrapping options to minimize external part count by manually resetting/un-resetting the ethernet.

Image

Any recommendations would be welcome! I've been stuck on this for about 20 hours.

fejess
Posts: 1
Joined: Sat Jul 07, 2018 4:07 pm

Re: Can't TX, ESP32 + LAN8720 with GPIO0 Clock Out

Postby fejess » Sat Jul 07, 2018 4:15 pm

Hello,

Im working on it too. Just without GPIO00.
Setup
ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
ETH_POWER_PIN -1
ETH_TYPE ETH_PHY_LAN8720
ETH_ADDR 1
ETH_MDC_PIN 23
ETH_MDIO_PIN 18

Also builded an ETH module, and its working.
I don't really understand this Clock modes, but maybe we can make one good solution.

In few days I will upload my .sch and .brd and code to my git.
If you are interested in, hit a reply on this.

cnlohr
Posts: 25
Joined: Sat Dec 03, 2016 5:39 am

Re: Can't TX, ESP32 + LAN8720 with GPIO0 Clock Out

Postby cnlohr » Sun Jul 08, 2018 6:27 pm

I also tried GPIO 16 and then GPIO 17 as output in a previous board rev and had exactly the same problems. I could RX packets all day long but couldn't TX anything.

WiFive
Posts: 1816
Joined: Tue Dec 01, 2015 7:35 am

Re: Can't TX, ESP32 + LAN8720 with GPIO0 Clock Out

Postby WiFive » Sun Jul 08, 2018 7:25 pm

Does lan8720 support a 1:2 ratio on the tx magnetics?

cnlohr
Posts: 25
Joined: Sat Dec 03, 2016 5:39 am

Re: Can't TX, ESP32 + LAN8720 with GPIO0 Clock Out

Postby cnlohr » Tue Jul 10, 2018 4:55 pm

I've tried it both ways, I have a number of different magnetics, and so far, no dice. I have used the LAN8720 before with success on other processors like the STM32F407, and I really like it. Glad you guys included support for it.

P.S. Related links:
My issue on github: https://github.com/espressif/esp-idf/issues/2164
Someone else who got it working:
https://github.com/espressif/esp-idf/pu ... -340727923

Still trying to figure out what's going on.

cnlohr
Posts: 25
Joined: Sat Dec 03, 2016 5:39 am

Re: Can't TX, ESP32 + LAN8720 with GPIO0 Clock Out

Postby cnlohr » Tue Jul 10, 2018 6:19 pm

Just FYI - I was able to get it working using GPIO17, inverted output. It looks like there may be phase issues with my board. Currently experimenting.

PeterR
Posts: 25
Joined: Mon Jun 04, 2018 2:47 pm

Re: Can't TX, ESP32 + LAN8720 with GPIO0 Clock Out

Postby PeterR » Mon Jul 16, 2018 10:34 am

Hi,
I have had similar problem with the OLIMEX ESP32-EVB (which uses the LAN8720), see viewtopic.php?f=2&t=6261
I can see data come in but EMAC TX seems frozen.
I have used the LAN8720 before without issue along side an NXP435x whilst developing a PTP driver.

I can influence the ESP32-EVB issue just by making small changes to the program.
Adding a delay after boot before initializing the Ethernet also seems to help.

I have parked the issue for the moment as I am expecting our own custom hardware and want to see how that performs first.
Please post when you know what the issue is.

Who is online

Users browsing this forum: No registered users and 5 guests