简体   繁体   中英

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)?

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.

There are two watchdogs (at least with stm32s10x).

IWDG, which is indepenent and resets stm without isr.

WWDG (window watchdog), which has a isr 1 tick before it will reset the stm32.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM