Skip to main content
xarion
Associate II
January 13, 2018
Question

Watchdog WWDG on STM32F0

  • January 13, 2018
  • 5 replies
  • 872 views
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

    This topic has been closed for replies.

    5 replies

    S.Ma
    Principal
    January 14, 2018
    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.

    xarion
    xarionAuthor
    Associate II
    January 17, 2018
    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

    Andrew Neil
    Super User
    January 17, 2018
    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 ...

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    waclawek.jan
    Super User
    January 17, 2018
    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