Skip to main content
Associate II
June 27, 2024
Solved

LwIP + LAN8720

  • June 27, 2024
  • 5 replies
  • 4730 views

Hi guys,

Just wonder if there is anyone tried LwIP on the newer version of stm32cubeIDE (1.12 and above). I am trying to integrate stm32F4 series with LAN8720.

There is a "Platform settings" which requires us to select the driver_PHY. I am using LAN8720 but I can only see "Undefined, LAN8742 and DP83848" as options.

I went thru UM1709, UM1713, UM1718 and AN3966 but still could not find the solution. At least UM1718 section 19.10 still mentioned there should be a "user PHY" but this option is not available in my current version of IDE.

Maybe I should just try to modify LAN8742's BSP driver's code? or is there anyway I could manually include the component drivers to be used in my project? If yes, may I know how? (Newbie to ethernet protocol)

QENicholas_0-1719455184746.png

 

Best answer by STea

Hello @QE-Nicholas ,

Any updates on this thread?
FYI: you can maybe use the attached LAN8420.c and .h files in here to help you implement it manually.

Regards

5 replies

ST Employee
July 31, 2024

Hello @QE-Nicholas ,

This is explicable as the boards provided by ST in the STM32F4 series don't have LAN8720.
so, this should be implemented manually you need to add the PHY file and the necessary changes in the Ethernetif.c file.

maybe you can start with one of the already existing Phy than port the generated code with the correct PHY init functions.

Regards

Andrew Neil
Super User
July 31, 2024

LwIP is an independent 3rd-party project:

https://savannah.nongnu.org/projects/lwip/

It's widely used, so maybe an internet search would reveal non-ST drivers for the LAN8720 ... ?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
STeaBest answer
ST Employee
August 14, 2024

Hello @QE-Nicholas ,

Any updates on this thread?
FYI: you can maybe use the attached LAN8420.c and .h files in here to help you implement it manually.

Regards

Associate
October 11, 2024

Hi @QE-Nicholas 

Did you solve the problem?

Associate
November 29, 2024

Hello. @QE-Nicholas  did you solve the problem???

 

Andrew Neil
Super User
November 29, 2024

@Murad @LeoGP did you try using the files linked by @STea in the marked solution ?

If you have tried that, and still face problems, then start your own thread with full details - as described in the Posting Tips:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228

You can always give a link back to this thread for reference ...

 

Update:

See: https://community.st.com/t5/stm32-mcus-embedded-software/how-to-use-lwip-lan8720/m-p/748729

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.