Skip to main content
Ebun.1
Senior
Sep 29, 2021 1:39 AM UTC
Question

Hard Fault after receiving packet with LwIP

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.

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
Oct 1, 2021 1:00 AM UTC

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
Ebun.1
Ebun.1Author
Senior
Oct 13, 2021 12:11 AM UTC

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.