cancel
Showing results for 
Search instead for 
Did you mean: 

Hard Fault after receiving packet with LwIP

Ebun.1
Senior

Thank you for helping.

The microcomputer is STM32F769I.

I wrote the code with reference to the HttpServer sample.

TCP / IP server application.

When I send a packet from a TCP client, I can receive it, but then it HardFaults.

It seems to happen after releasing a semaphore with an Ether interrupt.

What could be the cause and how should I debug it?

Thank you.

2 REPLIES 2

Looking at the Hard Fault Handler is going to tell you nothing.

You'd do better with a routine that unpacks the failure state,and then look at the code that was faulting and the registers at that time.

Look at a disassembly view of the failing code, match it to the C code you compiled, and work back up the call-stack from there.

What structures, what pointers, and if memory has been released, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Ebun.1
Senior

Hi Tesla DeLorean

It was working at the time of FreeRTOS Ver1.

I'm using Ver2 now.

But I don't know if it's a Ver2 problem.

Now I don't have time to track in other jobs.

Thank you for your response.