Skip to main content
Associate II
Aug 22, 2026 17:02 UTC
Solved

Hard Fault in TCP Echo Server (Ethernet)

Hi all , 

Im facing a issue in TCP/IP - Ethernet using LWIP on STM32H723ZGT6 [NUCLEO - H723ZG] , that i gave completed ethernet configuration , ping is good , wrote a tcp_echoserver and modified with my desired outputs , everything was a woking upto a certain level, and i cant RX and Tx and fall into hard fault (Added a Video of the output). I'll add the code file as a zip. 

Kindly help me to resolve ii.

Thank You!!!.....

Associate II
Aug 22, 2026 17:04 UTC

Thank you for all your reply, 

I have resolved it , 2hrs ago forgot to mention in the community, the issue was i have mapped my LWIP Rx pool at 0x30000400 at 16KB (approximately ends at 0x30004400) and set my lwip heap at 0x30004000 so both of them are overlapped , so only i got hardfault , finnally found and resolved it by placing the heap  @ 0x30005000. 

 

3 replies

Gokul_Sarvanakumar_60AuthorBest answer
Associate II
Aug 22, 2026 17:04 UTC

Thank you for all your reply, 

I have resolved it , 2hrs ago forgot to mention in the community, the issue was i have mapped my LWIP Rx pool at 0x30000400 at 16KB (approximately ends at 0x30004400) and set my lwip heap at 0x30004000 so both of them are overlapped , so only i got hardfault , finnally found and resolved it by placing the heap  @ 0x30005000. 

 

Andrew Neil
Super User
Aug 22, 2026 17:04 UTC

Debugging Cortex-M Hard Faults

LwIP debug & diagnostic options.

 


@Gokul_Sarvanakumar_60  wrote:

everything was a woking upto a certain level, and i cant RX and Tx and fall into hard fault...


As  @Uwe Bonnes  said, go back to the last working version; examine carefully what you changed.

Use the above-mentioned LwIP debug & diagnostic options to compare & contrast what happens in the working & non-working cases ...

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.
Uwe Bonnes
Chief
Aug 22, 2026 17:06 UTC

Hopefully you developped und revison control, e.g. with GIT. Then you can bisect to find the bad commit...