cstm32watchdogisrstm32ldiscovery

Interrupt service routine for watchdog timer on STM32 Discovery


I recently bought a STM32 Value line discovery kit to work with STM32 devices. I'm working on a project now which requires a watchdog. It's called IWDG in STM32. But my problem is that I need an ISR when the watchdog is triggered.

Does anyone know how to implement this (or even have an example)?


Solution

  • You don't want a watchdog, since the whole purpose of the watchdog is to force a reset if the software has hung.

    What you're after sounds more like simply a high-priority regular timer interrupt to me.

    Set it up so that you restart the timer (pushing the interrupt event generation forwards in time) at regular intervals, so that the interrupt typically doesn't happen.