STM32 RTOS 0.2.3
Bare-metal preemptive RTOS for STM32F446RE
Loading...
Searching...
No Matches
iwdg.c File Reference

IWDG driver implementation (API in iwdg.h). More...

#include "iwdg.h"
Include dependency graph for iwdg.c:

Go to the source code of this file.

Macros

#define IWDG_UPDATE_TIMEOUT_ITERATIONS   (100000U)
 Polls allowed for SR.PVU and SR.RVU to clear: an update takes up to 5 LSI cycles, under 300 us even at 17 kHz (see Poll-count timeouts).

Functions

static DriverStatus_e iwdgWaitUpdates (const IwdgRegisters_t *iwdg)
 Poll SR until no prescaler or reload update is in progress.
DRIVER_MUST_CHECK DriverStatus_e iwdgStart (IwdgRegisters_t *iwdg, uint32_t prescaler, uint32_t reload)
 Start the watchdog, then set its prescaler and reload value.
void iwdgRefresh (IwdgRegisters_t *iwdg)
 Reload the counter from RLR (KR = 0xAAAA).
void iwdgFreezeInDebug (DbgmcuRegisters_t *dbgmcu)
 Stop the IWDG counter whenever the core is halted by a debugger.

Detailed Description

IWDG driver implementation (API in iwdg.h).

Definition in file iwdg.c.