42#define LSI_FREQUENCY 32000
43#define COUNT_LENGTH 12
44#define COUNT_MASK ((1 << COUNT_LENGTH)-1)
75 const int PRESCALER_MAX = 6;
81 uint32_t count = period << 3;
100 if (prescale > PRESCALER_MAX) {
102 prescale = PRESCALER_MAX;
#define IWDG_RLR
Reload register (IWDG_RLR)
#define IWDG_SR
Status register (IWDG_SR)
#define IWDG_KR
Key Register (IWDG_KR)
#define IWDG_PR
Prescaler register (IWDG_PR)
void iwdg_start(void)
IWDG Enable Watchdog Timer.
void iwdg_set_period_ms(uint32_t period)
IWDG Set Period in Milliseconds.
bool iwdg_reload_busy(void)
IWDG Get Reload Register Status.
bool iwdg_prescaler_busy(void)
IWDG Get Prescaler Register Status.
void iwdg_reset(void)
IWDG reset Watchdog Timer.
#define IWDG_SR_PVU
PVU: Watchdog prescaler value update.
#define IWDG_SR_RVU
RVU: Watchdog counter reload value update.