2018-01-13 12:45 PM
Is there a way to determine the line of code or PC address that caused a call to the HAL_WWDG_EarlyWakeupCallback?
Perhaps print the previous stack entry address?
Thanks!
X
2018-01-14 06:23 AM
If running a debugger, usually one of the debug window is the call stack, which should have the information looked after.
2018-01-17 07:17 AM
This is not solvable in C or any higher level language, but trivial when coding the ISR in assembler (or at least a stub, which would then call C code with the rest of ISR).
JW
2018-01-17 08:08 AM
I forgot to mention in code rather than the debugger, ie returning the addresses/values in the stack
2018-01-17 08:42 AM
Take a look at the many articles on how to do a HardFault handler - as these show things like how to access the Stack Frame ...
2018-01-17 08:48 AM
It should be implemented as the real ISR (i.e.WWDG_IRQHandler()), not HAL_WWDG_IRQHandler() and of course not the callback.
JW