|
ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) 0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
|
#include <stdint.h>#include <stdbool.h>Go to the source code of this file.
Macros | |
| #define | IWDG_PRESCALER_4 0u |
| #define | IWDG_PRESCALER_8 1u |
| #define | IWDG_PRESCALER_16 2u |
| #define | IWDG_PRESCALER_32 3u |
| #define | IWDG_PRESCALER_64 4u |
| #define | IWDG_PRESCALER_128 5u |
| #define | IWDG_PRESCALER_256 6u |
Functions | |
| void | IWDG_Init (uint8_t prescaler, uint16_t reload) |
| Configure and start the independent watchdog. | |
| void | IWDG_Refresh (void) |
| Reload the watchdog counter ("kick" / "feed"). | |
| bool | IWDG_WasReset (void) |
| Was the most recent reset caused by the IWDG? | |
| void | IWDG_ClearResetFlag (void) |
| Clear the IWDG reset flag in RCC->RSR. | |
| void IWDG_ClearResetFlag | ( | void | ) |
| void IWDG_Init | ( | uint8_t | prescaler, |
| uint16_t | reload | ||
| ) |
Configure and start the independent watchdog.
| prescaler | One of the IWDG_PRESCALER_* values (3-bit PR field). |
| reload | 12-bit reload value (1..4095). Total timeout is (reload + 1) × prescaler_div / LSI. |
Definition at line 44 of file iwdg.c.
References IWDG_KEY_ENABLE, IWDG_KEY_REFRESH, IWDG_KEY_UNLOCK, and IWDG_PRESCALER_256.
| void IWDG_Refresh | ( | void | ) |
Reload the watchdog counter ("kick" / "feed").
Definition at line 70 of file iwdg.c.
References IWDG_KEY_REFRESH.
| bool IWDG_WasReset | ( | void | ) |
Was the most recent reset caused by the IWDG?
true if the IWDGRST flag in RCC->RSR was set on this boot, false otherwise. The flag is sticky until cleared with IWDG_ClearResetFlag(), so this query is safe to call any number of times.