cancel
Showing results for 
Search instead for 
Did you mean: 

Watchdog WWDG on STM32F0

xarion
Associate II
Posted on January 13, 2018 at 21:45

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

5 REPLIES 5
S.Ma
Principal
Posted on January 14, 2018 at 15:23

If running a debugger, usually one of the debug window is the call stack, which should have the information looked after.

Posted on January 17, 2018 at 16:17

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

Posted on January 17, 2018 at 16:08

I forgot to mention in code rather than the debugger, ie returning the addresses/values in the stack

Posted on January 17, 2018 at 16:42

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 ...

Posted on January 17, 2018 at 16:48

It should be implemented as the real ISR (i.e.WWDG_IRQHandler()), not HAL_WWDG_IRQHandler() and of course not the callback.

JW