libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
iwdg_common_all.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IWDG_KR   MMIO32(IWDG_BASE + 0x00)
 Key Register (IWDG_KR) More...
 
#define IWDG_PR   MMIO32(IWDG_BASE + 0x04)
 Prescaler register (IWDG_PR) More...
 
#define IWDG_RLR   MMIO32(IWDG_BASE + 0x08)
 Reload register (IWDG_RLR) More...
 
#define IWDG_SR   MMIO32(IWDG_BASE + 0x0c)
 Status register (IWDG_SR) More...
 
#define IWDG_KR_RESET   0xaaaa
 
#define IWDG_KR_UNLOCK   0x5555
 
#define IWDG_KR_START   0xcccc
 
#define IWDG_PR_LSB   0
 
#define IWDG_PR_DIV4   0x0
 
#define IWDG_PR_DIV8   0x1
 
#define IWDG_PR_DIV16   0x2
 
#define IWDG_PR_DIV32   0x3
 
#define IWDG_PR_DIV64   0x4
 
#define IWDG_PR_DIV128   0x5
 
#define IWDG_PR_DIV256   0x6
 
#define IWDG_SR_RVU   (1 << 1)
 RVU: Watchdog counter reload value update. More...
 
#define IWDG_SR_PVU   (1 << 0)
 PVU: Watchdog prescaler value update. More...
 

Functions

void iwdg_start (void)
 IWDG Enable Watchdog Timer. More...
 
void iwdg_set_period_ms (uint32_t period)
 IWDG Set Period in Milliseconds. More...
 
bool iwdg_reload_busy (void)
 IWDG Get Reload Register Status. More...
 
bool iwdg_prescaler_busy (void)
 IWDG Get Prescaler Register Status. More...
 
void iwdg_reset (void)
 IWDG reset Watchdog Timer. More...