← index #6503Issue #14013
Related · high · value 2.289
QUERY · ISSUE

ESP32 LAN8720 MDC/MDIO control only

openby emardopened 2020-10-01updated 2024-10-01
port-esp32needs-info

HI

Are ESP32 libraries that control ETH RMII PHY available
for direct use, I need to control LAN8720 MD interface
with 2 pins called MDC/MDIO, and I'd like some suggestion
how to do it from micropython.

I'd like to control only the PHY using this 2 pins and
II don't want to initialize ESP32 complete wired ethernet
with all of RMII pins, because those RMII pins are not
connected to ESP32.

CANDIDATE · ISSUE

Ethernet fails on the Olimex ESP32-POE-ISO Revision L

closedby PhantomPhotonopened 2024-03-03updated 2024-03-08
bug

Checks

  • I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.

  • I've searched for existing issues matching this bug, and didn't find any.

Port, board and/or hardware

ESP32-POE-ISO Revision L

MicroPython version

MicroPython v1.22.2 on 2024-02-22; Olimex ESP32 ETH with ESP32

Reproduction

lan = network.LAN(mdc=machine.Pin(23), mdio=machine.Pin(18), power=machine.Pin(12),
phy_type=network.PHY_LAN8720, phy_addr=0,
ref_clk=machine.Pin(17), ref_clk_mode=machine.Pin.OUT)
lan.active(True)

Expected behaviour

Expected ethernet to enable

Observed behaviour

OSError: ethernet enable failed

Additional Information

I've pulled the expected working code from https://docs.micropython.org/en/latest/esp32/quickref.html#lan

I know the Ethernet on the device works, when i flash it with a example program from arduino ide, it gets an ip and works correctly.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied