Skip to main content
Associate II
June 26, 2026
Question

STM32F207VC - Ethernet with LwIP(2.0.3) works after flashing but not any more after power supply is set off and on again

  • June 26, 2026
  • 5 replies
  • 119 views

Hello everyone,

I am experiencing a strange issue with the Ethernet interface on my STM32F207VC.

Problem Description

After programming the firmware using STM32CubeProgrammer v2.12.0 with an ST-LINK debugger, the application works perfectly:

- The board responds to ping.

- My PC client communicates successfully with the TCP server running on the STM32.

- Ethernet communication is fully functional.

However, after performing a power cycle, the Ethernet stops working:

- The board no longer responds to ping.

- TCP communication fails.

- The application itself appears to be running, but the Ethernet interface is non-functional.

Hardware Details

- MCU: STM32F207VC

- Ethernet interface: RMII

- Default STM32 RMII pins are used.

- Programming/Debugging: SWD (ST-LINK)

- The board has an external 8 MHz crystal, but in STM32CubeMX the MCU is configured to use the internal HSI clock (HSE is not enabled).

- The Ethernet PHY has its own 25 MHz crystal and provides the required 50 MHz RMII REF_CLK to the STM32.

The exact same firmware works immediately after flashing, so the application appears to be correct. The issue only occurs after removing and reapplying power.

Has anyone encountered a similar issue or have any suggestions on what I should investigate?

Any help would be greatly appreciated. Thank you!

5 replies

Pavel A.
June 26, 2026

IIRC this is a known issue. Need to add a delay somewhere from power-on to the ETH or PHY initialization.

 

kkshah73Author
Associate II
July 23, 2026

Already add delay when MAX_LWIP_INIT() CALL before and after 

Still not resolve.

Andrew Neil
Super User
June 27, 2026

However, after performing a power cycle, the Ethernet stops working

Does it recover if you then do a Reset ?

 

Have you tried enabling LwIP diagnostics to see what’s happening - and how the 2 cases differ ?

 

Generally, this kind of thing is an indication that your code is just assuming that something’s ready, but it actually isn’t.

It works under the debugger, because that introduces some delays.

As ​@Pavel A. said, there have been a number of threads like this - try a search.

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.
kkshah73Author
Associate II
July 23, 2026

After reset also ping not work or some time work.

It is random behavior.

Andrew Neil
Super User
July 24, 2026

So have you tried enabling LwIP diagnostics to see what’s happening - and how the 2 cases differ ?

Or a forum search for similar threads ?

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.