2025-10-08 7:11 AM
HI,
I am currently working on an Ethernet project using STM32F765IIT with the LwIP stack .
I have configured the MAC and PHY (DP83848/DP83842) in MII mode, and link status is active.
Now I want to verify Ethernet communication by implementing the ping (ICMP Echo Reply) functionality.
Could anyone please share:
My setup:
Any working example, configuration tips, or LwIP settings related to ping would be greatly appreciated.
Thank you,
Sreerag
2025-10-08 7:34 AM
Hello @SREERAG and welcome to ST Community!
Could you explain exactly what you configured in your project? Please provide an IOC file if possible. For the application to work correctly, you need to configure the Memory Protection Unit (MPU) for the memory sections used to store Tx/Rx descriptors and buffers and LWIP MEM_SIZE. You can follow the guide below, skip the FreeRTOS section, and just add MX_LWIP_Process() inside your while loop to poll for packets.
Feel free to ask questions if you get stuck. I’ll be happy to help.
Best regards,
2025-10-08 8:37 AM
Have you seen this? for a slightly different F7:
https://github.com/stm32-hotspot/CKB-LwIP-FreeRTOS-UDP-Echo-Server-F767
2025-10-09 1:41 AM
Hello @STackPointer64,
Thank you for your response.
In my project, I’m using STM32F765IIT custom board with DP83842 PHY in MII mode.
The setup is created using STM32CubeMX + STM32CubeIDE, with Ethernet + LwIP, but without FreeRTOS (bare-metal mode).
My goal is only to make ping (ICMP Echo) communication work, to verify the Ethernet interface.
Currently, the PHY link is up, but I don’t receive any ping replies from the MCU.
Could you please confirm:
Thank you for your guidance.
Best regards,
Sreerag
2025-10-09 1:48 AM
Hi Sreerag,
I can offer a suggestion for a working project you can use as a reference.
You can take a look at this project which is for a very similar board (STM32F756ZG). It uses the Mongoose Networking Library, a lightweight library designed for embedded systems with support for LwIP. Even though you're looking for a bare-metal example (and this one uses FreeRTOS instead), you can use this as a reference for a complex HTTP webserver powered by LwIP featuring a device dashboard. Also, you can take a look at the hardware setup in the .ioc file, since the configuration for the clocks, and Ethernet pins might be very similar to your board.
Heads up: I am part of the Mongoose development team and I hope this helps you get started!
2025-10-09 2:12 AM
Hello @SREERAG,
1- MPU and memory configuration are the same for baremetal LwIP and LwIP + FreeRTOS; just follow the guide.
2- There are only two functions to call: MX_LwIP_Init(), which is added automatically when you enable LwIP in your project, and MX_LWIP_Process(), which keeps polling for incoming packets and link status.
3- I've attached an example IOC configuration below. You still need to make the proper adjustments to the linker script as mentioned in the article.
Best regards,
2025-10-09 2:45 AM
Hello @STackPointer64,
Thank you for your response.
I am checked your IOC configuration, but it is configured for the STM32F767zi microcontroller. This file is working properly in the stm32f767zi controller with DP83848 PHY..
In my project, I’m using STM32F765IIT custom board with DP83842 PHY in MII mode.
Could you please confirm Any reference example or IOC configuration for STM32F765IIT + MII + LwIP (no RTOS) would be very helpful.
Best regards,
2025-10-09 3:06 AM
The IOC is for STM32F767ZI so I could test it on the Nucleo board. But fear not, because STM32F767ZI and STM32F765 share the same architecture. You only need to copy the MPU and LwIP configuration to your project.
Could you please confirm? Any reference example or IOC configuration for STM32F765IIT + MII + LwIP (no RTOS) would be very helpful.
As there are many MCUs with different packages, there isn't an example for each one. One suffices since they share the same architecture. Nonetheless, I attached a newly created IOC for the MCU you are using.