Skip to main content
genisuvi
Associate III
Jun 7, 2023 3:40 PM UTC
Question

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

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.

    2 replies

    Tesla DeLorean
    Guru
    Jun 7, 2023 5:50 PM UTC

    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

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    genisuvi
    genisuviAuthor
    Associate III
    Jun 8, 2023 7:17 AM UTC

    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.