STM32 RTOS
0.2.3
Bare-metal preemptive RTOS for STM32F446RE
Toggle main menu visibility
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
62
DRIVER_MUST_CHECK
DriverStatus_e
wwdgStart
(
WwdgRegisters_t
*wwdg, uint32_t prescaler,
63
uint32_t window, uint32_t counter);
64
76
DRIVER_MUST_CHECK
DriverStatus_e
wwdgRefresh
(
WwdgRegisters_t
*wwdg, uint32_t counter);
77
85
void
wwdgEnableEarlyWakeup
(
WwdgRegisters_t
*wwdg);
86
94
void
wwdgClearEarlyWakeup
(
WwdgRegisters_t
*wwdg);
95
103
void
wwdgFreezeInDebug
(
DbgmcuRegisters_t
*dbgmcu);
104
106
107
#endif
/* WWDG_H */
dbgmcu_reg.h
DBGMCU registers: the MCU debug component (RM0390, debug support chapter, DBGMCU).
driver_status.h
The status every fallible driver function returns.
DriverStatus_e
DriverStatus_e
Outcome of a driver call: a category for control flow, not a diagnosis.
Definition
driver_status.h:32
DRIVER_MUST_CHECK
#define DRIVER_MUST_CHECK
Make ignoring a function's result a compile error (with -Werror).
Definition
driver_status.h:22
wwdgRefresh
DRIVER_MUST_CHECK DriverStatus_e wwdgRefresh(WwdgRegisters_t *wwdg, uint32_t counter)
Reload the counter with counter (CR = WDGA | counter).
Definition
wwdg.c:63
wwdgFreezeInDebug
void wwdgFreezeInDebug(DbgmcuRegisters_t *dbgmcu)
Stop the WWDG counter whenever the core is halted by a debugger.
Definition
wwdg.c:86
wwdgEnableEarlyWakeup
void wwdgEnableEarlyWakeup(WwdgRegisters_t *wwdg)
Raise WWDG_IRQn when the counter reaches 0x40, one count before reset.
Definition
wwdg.c:75
wwdgStart
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
wwdgClearEarlyWakeup
void wwdgClearEarlyWakeup(WwdgRegisters_t *wwdg)
Clear the early-wakeup flag (SR.EWIF, write 0 to clear).
Definition
wwdg.c:80
DbgmcuRegisters_t
DBGMCU register block.
Definition
dbgmcu_reg.h:24
WwdgRegisters_t
WWDG register block.
Definition
wwdg_reg.h:23
wwdg_reg.h
WWDG registers: the window watchdog (RM0390 section 21.6).
drivers
inc
wwdg.h
Generated by
1.18.0