2023-06-07 08:40 AM - edited 2023-11-20 03:44 AM
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:
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?
2023-06-07 10:50 AM
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
2023-06-08 12:17 AM
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?
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.