Skip to main content
Graduate
June 7, 2023
Question

How do you get information of a hardfault tracking with disassembly view on CubeIDE like this?

  • June 7, 2023
  • 1 reply
  • 975 views

I was debugging an application that works fine for hours. Suddenly it uses to enter in a hard fault error. I talked too much about the application but I would like to focus the post on how to trace some hard fault thas has been occurred. It doesn't uses RTOS, it uses HAL and Lwip stacks.

I put a breakpoint on hardault handler.

And the I see the next windows and tags:
_legacyfs_online_stmicro_images_0693W00000dDKIWQA4.png 

How should I read this graphical information?

My guess:

At left corner it is saiying me that hardfault is happening when it was executing time_update() function.

But 3 kind of adress are appearing there: 0x2001ff88, 0x8000d78 and 0xfffffff1

These addresses are a related address that disassembly shows me at right corner. But I don't know if there is any usefull information for me.

What does it mean the 3 address? Which relation with hardfault event?

Which is the link between hardfault and movs r0, r0 assembly instructions?

    This topic has been closed for replies.

    1 reply

    Graduate II
    June 7, 2023

    The 0xFFFFFFFx return addresses are a call-gate, ie cause special case return from interrupt or system handler.

    Check stack for what's pushed there in terms of CPU context

    genisuviAuthor
    Graduate
    June 8, 2023

    Thanks, Tesla. That's what would like to do but I don't know how to do this, so I'm answering here for this. Could you tell me if I'm wrong, please?

    • According to the shared screen, looking at the stack I see time_update() function.
    • And on the above line I can see a 0x2001ff88 printed value.

    Is it time_update what is pushed there?

    What is the line with 0x2001ff88 value? is it an important log print?

    NOTE1: the application doesn't implements any interruption. It has the system interruption and the systick_handler for HAL tick system.

    NOTE2: time_update is a simple tick counter that is called every systick. It increments its value when tick = 500.

    Thanks in advance.