STM32 RTOS 0.2.3
Bare-metal preemptive RTOS for STM32F446RE
Loading...
Searching...
No Matches
wwdg.h
Go to the documentation of this file.
1
23#ifndef WWDG_H
24#define WWDG_H
25
26#include "dbgmcu_reg.h"
27#include "driver_status.h"
28#include "wwdg_reg.h"
29
30#include <stdint.h>
31
36
37#define WWDG_COUNTER_MIN (0x40U)
38#define WWDG_COUNTER_MAX (0x7FU)
39
63 uint32_t window, uint32_t counter);
64
77
86
95
104
106
107#endif /* WWDG_H */
DBGMCU registers: the MCU debug component (RM0390, debug support chapter, DBGMCU).
The status every fallible driver function returns.
DriverStatus_e
Outcome of a driver call: a category for control flow, not a diagnosis.
#define DRIVER_MUST_CHECK
Make ignoring a function's result a compile error (with -Werror).
DRIVER_MUST_CHECK DriverStatus_e wwdgRefresh(WwdgRegisters_t *wwdg, uint32_t counter)
Reload the counter with counter (CR = WDGA | counter).
Definition wwdg.c:63
void wwdgFreezeInDebug(DbgmcuRegisters_t *dbgmcu)
Stop the WWDG counter whenever the core is halted by a debugger.
Definition wwdg.c:86
void wwdgEnableEarlyWakeup(WwdgRegisters_t *wwdg)
Raise WWDG_IRQn when the counter reaches 0x40, one count before reset.
Definition wwdg.c:75
DRIVER_MUST_CHECK DriverStatus_e wwdgStart(WwdgRegisters_t *wwdg, uint32_t prescaler, uint32_t window, uint32_t counter)
Set the window and timer base, then start the watchdog counting from counter.
Definition wwdg.c:30
void wwdgClearEarlyWakeup(WwdgRegisters_t *wwdg)
Clear the early-wakeup flag (SR.EWIF, write 0 to clear).
Definition wwdg.c:80
DBGMCU register block.
Definition dbgmcu_reg.h:24
WWDG register block.
Definition wwdg_reg.h:23
WWDG registers: the window watchdog (RM0390 section 21.6).