GlobLib
HAL and API libraries for MCUs and hardware.
|
This module contains low level functions for watchdog configuration. More...
Files | |
file | stm32f103cb_iwdg.h |
Header file for stm32f103cb independant watchdog timer. | |
Functions | |
mcu_error | IWDG_setup (uint32_t timeout) |
Initialize the independant watchdog timer. More... | |
bool | IWDG_resetCheck (void) |
Check if reset occured from watchdog timeout. More... | |
void | IWDG_feed (void) |
Reload the watchdog timer. More... | |
This module contains low level functions for watchdog configuration.
The stm32f103cb independant watchdog timer can be configured with a timeout of up to 26 seconds. To avoid a forced reset the timer should be reloaded with IWDG_feed() before the timeout time has elapsed.
IWDG_resetCheck() can be used to check if a reset has occured from a watchdog timeout.
void IWDG_feed | ( | void | ) |
Reload the watchdog timer.
This should be called at least as often as the watchdog timeout value to avoid forced reset.
Definition at line 110 of file stm32f103cb_iwdg.c.
bool IWDG_resetCheck | ( | void | ) |
Check if reset occured from watchdog timeout.
Definition at line 98 of file stm32f103cb_iwdg.c.
mcu_error IWDG_setup | ( | uint32_t | timeout | ) |
Initialize the independant watchdog timer.
This must be called before any other feature is used.
timeout | The timeout period in milliseconds |
Definition at line 19 of file stm32f103cb_iwdg.c.