Skip to main content
Visitor II
September 29, 2021
Question

Hard Fault after receiving packet with LwIP

  • September 29, 2021
  • 2 replies
  • 1263 views

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

    Graduate II
    October 1, 2021

    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.

    Ebun.1Author
    Visitor II
    October 13, 2021

    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.