33 lines
847 B
C

/**
* @file app_wdt.h
* @brief Independent watchdog (IWDG, LSI 32kHz): 4s timeout, fed from the
* FreeRTOS idle hook only while at least one application task has
* heartbeated within the last 3s. Frozen while the core is halted
* (DBG_IWDG_STOP) so SWD debug sessions do not trigger resets.
*/
#ifndef __APP_WDT_H__
#define __APP_WDT_H__
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Report the reset cause (banner) and start the IWDG.
* Call once from main() after the USART banner.
*/
void app_wdt_init(void);
/**
* @brief Mark a task as alive. Called from the BLE schedule / LED / CLI
* task loops; the idle hook stops feeding the IWDG when no task
* heartbeated for APP_WDT_HB_TIMEOUT_MS.
*/
void app_wdt_heartbeat(void);
#ifdef __cplusplus
}
#endif
#endif /* __APP_WDT_H__ */