Skip to main content
Associate
May 27, 2025
Solved

use STM32L5 or H5 with an external PHY ksz8851 chip to access the Internet.

  • May 27, 2025
  • 2 replies
  • 697 views

In this regard, I would like to use STM32L5 or H5 development boards to implement the LWIP protocol stack+FREERTOS minimal system. I have no idea how to build the LWIP protocol stack on the FREERTOS system. May I ask if you can send me the LWIP protocol stack code or demo suitable for STM32L5 or H5。Thanks!

Best answer by mƎALLEm

Hello,

That's definitely an ETH controller not just an Ethernet PHY .

There was someone used KSZ8851SNL with STM32H7. See this github link, ioc file included. So you need to inspire from it.

Hope that helps.

2 replies

mbarg.1
Senior III
May 27, 2025

Start a new project, select download any example flagging MCU family and LWiP ! 

With STM32CubeIde, of course.

WL1Author
Associate
May 27, 2025

thanks for reply .For example, can I create a f407 project with LWIP+Freertos and directly copy the LWIP related code into the L5 project

mbarg.1
Senior III
May 27, 2025

No, you cannot take all - you need to write low level drivers and later interface to LWIP - It depends to what hardware you are using, every hw has it own requirements

Guillaume K
ST Employee
June 3, 2025

Does the external PHY ksz8851 use a RMII bus to connect to the micro controller ?

The STM32L5 doesn't have an Ethernet MAC IP (no RMII ethernet interface).

 

WL1Author
Associate
June 11, 2025

l5 use spi connected ksz8851 

mƎALLEm
mƎALLEmBest answer
Technical Moderator
June 11, 2025

Hello,

That's definitely an ETH controller not just an Ethernet PHY .

There was someone used KSZ8851SNL with STM32H7. See this github link, ioc file included. So you need to inspire from it.

Hope that helps.

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."