|
STM32 RTOS 0.2.3
Bare-metal preemptive RTOS for STM32F446RE
|
WWDG registers: the window watchdog (RM0390 section 21.6). More...
#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | WwdgRegisters_t |
| WWDG register block. More... | |
Macros | |
| #define | WWDG_BASE (0x40002C00UL) |
| WWDG base address (APB1). | |
| #define | WWDG ((WwdgRegisters_t *)WWDG_BASE) |
| The WWDG instance. | |
CR - control (0x00) | |
| #define | WWDG_CR_T_Pos (0U) |
| Bits 6:0. | |
| #define | WWDG_CR_T_Msk ((uint32_t)0x7FU << WWDG_CR_T_Pos) |
| rw 7-bit down-counter; reset when bit 6 falls to 0. | |
| #define | WWDG_CR_WDGA_Pos (7U) |
| Bit 7. | |
| #define | WWDG_CR_WDGA ((uint32_t)1U << WWDG_CR_WDGA_Pos) |
| rs Activate the watchdog; only a reset clears it. | |
CFR - configuration (0x04) | |
| #define | WWDG_CFR_W_Pos (0U) |
| Bits 6:0. | |
| #define | WWDG_CFR_W_Msk ((uint32_t)0x7FU << WWDG_CFR_W_Pos) |
| rw Window value: refreshing above it resets the chip. | |
| #define | WWDG_CFR_WDGTB_Pos (7U) |
| Bits 8:7. | |
| #define | WWDG_CFR_WDGTB_Msk ((uint32_t)0x3U << WWDG_CFR_WDGTB_Pos) |
| rw Timer base: PCLK1 / 4096 / 2^WDGTB. | |
| #define | WWDG_CFR_WDGTB_DIV1 (0x0U) |
| WDGTB value: PCLK1 / 4096. | |
| #define | WWDG_CFR_WDGTB_DIV2 (0x1U) |
| WDGTB value: PCLK1 / 4096 / 2. | |
| #define | WWDG_CFR_WDGTB_DIV4 (0x2U) |
| WDGTB value: PCLK1 / 4096 / 4. | |
| #define | WWDG_CFR_WDGTB_DIV8 (0x3U) |
| WDGTB value: PCLK1 / 4096 / 8. | |
| #define | WWDG_CFR_EWI_Pos (9U) |
| Bit 9. | |
| #define | WWDG_CFR_EWI ((uint32_t)1U << WWDG_CFR_EWI_Pos) |
| rs Enable the early-wakeup interrupt; only a reset clears it. | |
SR - status (0x08) | |
| #define | WWDG_SR_EWIF_Pos (0U) |
| Bit 0. | |
| #define | WWDG_SR_EWIF ((uint32_t)1U << WWDG_SR_EWIF_Pos) |
| rc_w0 Early-wakeup flag. | |
Typedefs | |
| typedef struct WwdgRegisters_t | WwdgRegisters_t |
| WWDG register block. | |
WWDG registers: the window watchdog (RM0390 section 21.6).
Clocked from PCLK1. A refresh (rewriting CR.T) resets the chip if it comes too late or before the counter has fallen below CFR.W, so the WWDG also catches code that runs too fast.
Definition in file wwdg_reg.h.