LAN8720 eth2ap example very slow speed

theidealist
Posts: 1
Joined: Mon Oct 11, 2021 4:24 pm

LAN8720 eth2ap example very slow speed

Postby theidealist » Mon Oct 11, 2021 4:50 pm

Hello, first time poster here.

I recently acquired a pair of "Hanrun" LAN8720 boards in the hope to create a "transparent bridge" using it and one of my esp32 dev kit 1 v1 boards, following the eth2ap example.

In the past I've just used micropython, although I have added some custom extensions and had to rebuild and reflash that firmware. I'm more of a software guy than an electrical engineer, but not great at either. I read a lot of docs and configured the eth2ap example to the best of my abilities, built the firmware, flashed it and reboot.

Amazingly, the thing worked! W00t!

But the download speeds were terrible. Like half a mbps, compared to 40mbps over the ethernet. This might actually be good enough for my use-case, but I would love to understand if I have possibly set something up terribly.

Connections:
Lan8720 Conn -> ESP32 Conn -> Dev kit 1 Pin Label
TX1 -> GPIO17 -> TX2
NC -> GPIO23 -> D23
TX-EN -> GPIO21 -> D21
TX0 -> GPIO 19 -> D19
RX0 -> GPIO25 -> D25
RX1 -> GPIO26 -> D26
nINT/RETCLK -> NOT CONNECTED!
CRS -> GPIO27 -> D27
MDIO -> GPIO18 -> D18
MDC -> GPIO23 ->D23
GND -> GND -> GND
VCC -> 3.3V -> 3V3

All connections were made via probably 10" long, small gauge wire with good pin connectors (no soldering).

I selected the option to use the internal APLL to drive the 50Mhz signal, outputing it on GPIO17 as is recommended here

My questions are as follows:
1. Is the slowness likely to do with the long wires, or something else?
2. Is there a way to select which Wifi channel is best? My router tells me the other channels it's using for my 2.4ghz and 5ghz networks, so I just stayed away from those.
3. Is the nINT/RETCLK used by anything if the ESP32 side is driving the clock?
4. GPIO5 is configured as the PHY reset, but I can't figure out what that is for?
5. Some references indicate that I should de-solder the 50Mhz crystal on the Lan8720. Is that worth trying?
6. Any other suggestions?

Thanks!

Who is online

Users browsing this forum: Bing [Bot] and 132 guests