|
STM32 RTOS 0.2.3
Bare-metal preemptive RTOS for STM32F446RE
|
Independent watchdog. More...
Data Structures | |
| struct | IwdgRegisters_t |
| IWDG register block. More... | |
Macros | |
| #define | IWDG_BASE (0x40003000UL) |
| IWDG base address (APB1). | |
| #define | IWDG ((IwdgRegisters_t *)IWDG_BASE) |
| The IWDG instance. | |
Typedefs | |
| typedef struct IwdgRegisters_t | IwdgRegisters_t |
| IWDG register block. | |
KR - key values (0x00) | |
| #define | IWDG_KEY_RELOAD (0xAAAAU) |
| Reload the counter from RLR (refresh). | |
| #define | IWDG_KEY_ENABLE_ACCESS (0x5555U) |
| Unlock PR and RLR for writing. | |
| #define | IWDG_KEY_START (0xCCCCU) |
| Start the watchdog; it cannot be stopped. | |
PR - prescaler (0x04) | |
| #define | IWDG_PR_PR_Pos (0U) |
| Bits 2:0. | |
| #define | IWDG_PR_PR_Msk ((uint32_t)0x7U << IWDG_PR_PR_Pos) |
| rw LSI divider: /4 << value, up to /256. | |
PR values | |
7 also divides by 256; IWDG_PR_DIV256 is the one value used for it. | |
| #define | IWDG_PR_DIV4 (0x0U) |
| LSI / 4. | |
| #define | IWDG_PR_DIV8 (0x1U) |
| LSI / 8. | |
| #define | IWDG_PR_DIV16 (0x2U) |
| LSI / 16. | |
| #define | IWDG_PR_DIV32 (0x3U) |
| LSI / 32. | |
| #define | IWDG_PR_DIV64 (0x4U) |
| LSI / 64. | |
| #define | IWDG_PR_DIV128 (0x5U) |
| LSI / 128. | |
| #define | IWDG_PR_DIV256 (0x6U) |
| LSI / 256. | |
RLR - reload (0x08) | |
| #define | IWDG_RLR_RL_Pos (0U) |
| Bits 11:0. | |
| #define | IWDG_RLR_RL_Msk ((uint32_t)0xFFFU << IWDG_RLR_RL_Pos) |
| rw Counter reload value. | |
SR - status (0x0C) | |
| #define | IWDG_SR_PVU_Pos (0U) |
| Bit 0. | |
| #define | IWDG_SR_PVU ((uint32_t)1U << IWDG_SR_PVU_Pos) |
| ro A PR update is in progress. | |
| #define | IWDG_SR_RVU_Pos (1U) |
| Bit 1. | |
| #define | IWDG_SR_RVU ((uint32_t)1U << IWDG_SR_RVU_Pos) |
| ro An RLR update is in progress. | |
Independent watchdog.
| #define IWDG_BASE (0x40003000UL) |
IWDG base address (APB1).
Definition at line 22 of file iwdg_reg.h.
| #define IWDG ((IwdgRegisters_t *)IWDG_BASE) |
The IWDG instance.
Definition at line 33 of file iwdg_reg.h.
| #define IWDG_KEY_RELOAD (0xAAAAU) |
Reload the counter from RLR (refresh).
Definition at line 37 of file iwdg_reg.h.
Referenced by iwdgRefresh().
| #define IWDG_KEY_ENABLE_ACCESS (0x5555U) |
| #define IWDG_KEY_START (0xCCCCU) |
Start the watchdog; it cannot be stopped.
Definition at line 39 of file iwdg_reg.h.
Referenced by iwdgStart().
| #define IWDG_PR_PR_Pos (0U) |
| #define IWDG_PR_PR_Msk ((uint32_t)0x7U << IWDG_PR_PR_Pos) |
rw LSI divider: /4 << value, up to /256.
Definition at line 46 of file iwdg_reg.h.
| #define IWDG_PR_DIV4 (0x0U) |
LSI / 4.
Definition at line 52 of file iwdg_reg.h.
| #define IWDG_PR_DIV8 (0x1U) |
LSI / 8.
Definition at line 53 of file iwdg_reg.h.
| #define IWDG_PR_DIV16 (0x2U) |
LSI / 16.
Definition at line 54 of file iwdg_reg.h.
| #define IWDG_PR_DIV32 (0x3U) |
LSI / 32.
Definition at line 55 of file iwdg_reg.h.
| #define IWDG_PR_DIV64 (0x4U) |
LSI / 64.
Definition at line 56 of file iwdg_reg.h.
| #define IWDG_PR_DIV128 (0x5U) |
LSI / 128.
Definition at line 57 of file iwdg_reg.h.
| #define IWDG_PR_DIV256 (0x6U) |
| #define IWDG_RLR_RL_Pos (0U) |
| #define IWDG_RLR_RL_Msk ((uint32_t)0xFFFU << IWDG_RLR_RL_Pos) |
| #define IWDG_SR_PVU_Pos (0U) |
Bit 0.
Definition at line 70 of file iwdg_reg.h.
| #define IWDG_SR_PVU ((uint32_t)1U << IWDG_SR_PVU_Pos) |
ro A PR update is in progress.
Definition at line 72 of file iwdg_reg.h.
Referenced by iwdgWaitUpdates().
| #define IWDG_SR_RVU_Pos (1U) |
Bit 1.
Definition at line 73 of file iwdg_reg.h.
| #define IWDG_SR_RVU ((uint32_t)1U << IWDG_SR_RVU_Pos) |
ro An RLR update is in progress.
Definition at line 75 of file iwdg_reg.h.
Referenced by iwdgWaitUpdates().