TM STM32F4xx Libraries  v1.0.0
Libraries for STM32F4xx devices from Tilen Majerle
TM_WATCHDOG_Functions

Library Functions. More...

Macros

#define TM_WATCHDOG_Reset()    (IWDG->KR = 0xAAAA)
 Reset Watchdog timer. More...
 

Functions

uint8_t TM_WATCHDOG_Init (TM_WATCHDOG_Timeout_t timeout)
 Initialize Watchdog timer. More...
 

Detailed Description

Library Functions.

Macro Definition Documentation

#define TM_WATCHDOG_Reset ( )    (IWDG->KR = 0xAAAA)

Reset Watchdog timer.

Note
This function have to be called periodically to reset watchdog timer, or your system will reset
Parameters
None
Return values
None
Note
Defined as macro for faster execution

Function Documentation

uint8_t TM_WATCHDOG_Init ( TM_WATCHDOG_Timeout_t  timeout)

Initialize Watchdog timer.

Note
After you initialize it, you can't disable it unless reset occur.
Parameters
timeout.Timeout value when watchdog reset happen if not reset by user. This parameter can be a value of TM_WATCHDOG_Timeout_t enumeration
Return values
Valueif system was reset because of watchdog timer
  • 1: Reset happen because of watchdog
  • 0: Otherwise