11#include "fsl_common.h"
24#define FSL_WDOG_DRIVER_VERSION (MAKE_VERSION(2, 1, 1))
28#define WDOG_REFRESH_KEY (0xAAAA5555U)
80#if defined(__cplusplus)
148static inline void WDOG_Enable(
WDOG_Type *base)
150 base->WCR |= WDOG_WCR_WDE_MASK;
161static inline void WDOG_Disable(
WDOG_Type *base)
163 base->WCR &= ~(uint16_t)WDOG_WCR_WDE_MASK;
175static inline void WDOG_TriggerSystemSoftwareReset(
WDOG_Type *base)
177 base->WCR &= ~(uint16_t)WDOG_WCR_SRS_MASK;
191static inline void WDOG_TriggerSoftwareSignal(
WDOG_Type *base)
193 base->WCR &= ~(uint16_t)WDOG_WCR_WDA_MASK;
207static inline void WDOG_EnableInterrupts(
WDOG_Type *base, uint16_t mask)
255static inline void WDOG_SetTimeoutValue(
WDOG_Type *base, uint16_t timeoutCount)
257 base->WCR = (base->WCR & (uint16_t)~WDOG_WCR_WT_MASK) |
WDOG_WCR_WT(timeoutCount);
270static inline void WDOG_SetInterrputTimeoutValue(
WDOG_Type *base, uint16_t timeoutCount)
272 base->WICR = (base->WICR & ~(uint16_t)WDOG_WICR_WICT_MASK) |
WDOG_WICR_WICT(timeoutCount);
283static inline void WDOG_DisablePowerDownEnable(
WDOG_Type *base)
285 base->WMCR &= ~(uint16_t)WDOG_WMCR_PDE_MASK;
299#if defined(__cplusplus)
#define WDOG_WCR_WT(x)
Definition: MIMXRT1052.h:51055
#define WDOG_WICR_WICT(x)
Definition: MIMXRT1052.h:51109
_wdog_status_flags
WDOG status flags.
Definition: fsl_wdog.h:68
void WDOG_Refresh(WDOG_Type *base)
Refreshes the WDOG timer.
Definition: fsl_wdog.c:205
uint16_t timeoutValue
Definition: fsl_wdog.h:45
bool softwareResetExtension
Definition: fsl_wdog.h:47
uint16_t WDOG_GetStatusFlags(WDOG_Type *base)
Gets the WDOG all reset status flags.
Definition: fsl_wdog.c:162
void WDOG_ClearInterruptStatus(WDOG_Type *base, uint16_t mask)
Clears the WDOG flag.
Definition: fsl_wdog.c:189
bool enableWdog
Definition: fsl_wdog.h:42
void WDOG_Init(WDOG_Type *base, const wdog_config_t *config)
Initializes the WDOG.
Definition: fsl_wdog.c:104
bool enableWait
Definition: fsl_wdog.h:34
_wdog_interrupt_enable
WDOG interrupt configuration structure, default settings all disabled.
Definition: fsl_wdog.h:58
bool enableDebug
Definition: fsl_wdog.h:36
bool enableTimeOutAssert
Definition: fsl_wdog.h:49
bool enableStop
Definition: fsl_wdog.h:35
uint16_t interruptTimeValue
Definition: fsl_wdog.h:46
void WDOG_Deinit(WDOG_Type *base)
Shuts down the WDOG.
Definition: fsl_wdog.c:140
void WDOG_GetDefaultConfig(wdog_config_t *config)
Initializes the WDOG configuration structure.
Definition: fsl_wdog.c:68
bool enableInterrupt
Definition: fsl_wdog.h:44
struct _wdog_work_mode wdog_work_mode_t
Defines WDOG work mode.
wdog_work_mode_t workMode
Definition: fsl_wdog.h:43
bool enablePowerDown
Definition: fsl_wdog.h:48
struct _wdog_config wdog_config_t
Describes WDOG configuration structure.
@ kWDOG_RunningFlag
Definition: fsl_wdog.h:69
@ kWDOG_TimeoutResetFlag
Definition: fsl_wdog.h:71
@ kWDOG_SoftwareResetFlag
Definition: fsl_wdog.h:72
@ kWDOG_InterruptFlag
Definition: fsl_wdog.h:73
@ kWDOG_PowerOnResetFlag
Definition: fsl_wdog.h:70
@ kWDOG_InterruptEnable
Definition: fsl_wdog.h:59
Definition: MIMXRT1052.h:50962
Describes WDOG configuration structure.
Definition: fsl_wdog.h:41
Defines WDOG work mode.
Definition: fsl_wdog.h:33
Definition: deflate.c:114