pyboard with LAN8720

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
Antonio
Posts: 3
Joined: Tue Mar 24, 2020 7:38 am

pyboard with LAN8720

Post by Antonio » Tue Mar 31, 2020 7:25 am

I have a board which have stm32f405 and LAN8720 PHY,it use the mcu mac, i want to use it in mpy,but when i import network module,the module has no 'LAN' method(only a router method),i download a pyboard network DFU , it has no 'LAN' method either.
Does any one test pyboard using its own mac with a PHY like LAN8720?
I think it maybe run faster with this PHY although it need eight PIN to connect to PHY with RMMI interface,because the mac is inside the mcu.
if anyone test pyboard with it,please share your DFU.
any help would be appreciated

User avatar
jimmo
Posts: 1633
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: pyboard with LAN8720

Post by jimmo » Tue Mar 31, 2020 12:15 pm

Hi,

The "network" builds have network drivers for CC3000 and WIZ820io included. This does not include the RMII/MII on-chip MAC driver.

I have not tried this myself but I understand it is possible on the pyboard v11 (with the F405).

You will need to build your own firmware and enable the RMII ethernet interface by adding the following to ports/stm32/boards/PYBV11/mpconfigboard.h

Then follow the build instructions (ports/stm32/README.md) and build using
make BOARD=PYBV11

Code: Select all

// Ethernet via RMII
#define MICROPY_HW_ETH_MDC          (pin_C1)
#define MICROPY_HW_ETH_MDIO         (pin_A2)
#define MICROPY_HW_ETH_RMII_REF_CLK (pin_A1)
#define MICROPY_HW_ETH_RMII_CRS_DV  (pin_A7)
#define MICROPY_HW_ETH_RMII_RXD0    (pin_C4)
#define MICROPY_HW_ETH_RMII_RXD1    (pin_C5)
#define MICROPY_HW_ETH_RMII_TX_EN   (pin_B11)
#define MICROPY_HW_ETH_RMII_TXD0    (pin_B12)
#define MICROPY_HW_ETH_RMII_TXD1    (pin_B13)
(You might want to double-check those pin assignments from the manual, but I assume you've already figured this out for wiring up your LAN8720)

(I copied this with some small pin modifications from the NUCLEO_F429ZI board definition)

Post Reply