20 #ifndef STM32F4xx_LL_WWDG_H
21 #define STM32F4xx_LL_WWDG_H
28 #include "stm32f4xx.h"
54 #define LL_WWDG_CFR_EWI WWDG_CFR_EWI
62 #define LL_WWDG_PRESCALER_1 0x00000000u
63 #define LL_WWDG_PRESCALER_2 WWDG_CFR_WDGTB_0
64 #define LL_WWDG_PRESCALER_4 WWDG_CFR_WDGTB_1
65 #define LL_WWDG_PRESCALER_8 (WWDG_CFR_WDGTB_0 | WWDG_CFR_WDGTB_1)
88 #define LL_WWDG_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
96 #define LL_WWDG_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
125 SET_BIT(WWDGx->CR, WWDG_CR_WDGA);
136 return ((READ_BIT(WWDGx->CR, WWDG_CR_WDGA) == (WWDG_CR_WDGA)) ? 1UL : 0UL);
152 MODIFY_REG(WWDGx->CR, WWDG_CR_T, Counter);
163 return (READ_BIT(WWDGx->CR, WWDG_CR_T));
181 MODIFY_REG(WWDGx->CFR, WWDG_CFR_WDGTB, Prescaler);
196 return (READ_BIT(WWDGx->CFR, WWDG_CFR_WDGTB));
217 MODIFY_REG(WWDGx->CFR, WWDG_CFR_W, Window);
228 return (READ_BIT(WWDGx->CFR, WWDG_CFR_W));
249 return ((READ_BIT(WWDGx->SR, WWDG_SR_EWIF) == (WWDG_SR_EWIF)) ? 1UL : 0UL);
260 WRITE_REG(WWDGx->SR, ~WWDG_SR_EWIF);
280 SET_BIT(WWDGx->CFR, WWDG_CFR_EWI);
291 return ((READ_BIT(WWDGx->CFR, WWDG_CFR_EWI) == (WWDG_CFR_EWI)) ? 1UL : 0UL);
__STATIC_INLINE void LL_WWDG_SetCounter(WWDG_TypeDef *WWDGx, uint32_t Counter)
Set the Watchdog counter value to provided value (7-bits T[6:0])
__STATIC_INLINE uint32_t LL_WWDG_GetCounter(WWDG_TypeDef *WWDGx)
Return current Watchdog Counter Value (7 bits counter value) @rmtoll CR T LL_WWDG_GetCounter.
__STATIC_INLINE void LL_WWDG_Enable(WWDG_TypeDef *WWDGx)
Enable Window Watchdog. The watchdog is always disabled after a reset.
__STATIC_INLINE void LL_WWDG_SetPrescaler(WWDG_TypeDef *WWDGx, uint32_t Prescaler)
Set the time base of the prescaler (WDGTB).
__STATIC_INLINE uint32_t LL_WWDG_GetWindow(WWDG_TypeDef *WWDGx)
Return current Watchdog Window Value (7 bits value) @rmtoll CFR W LL_WWDG_GetWindow.
__STATIC_INLINE void LL_WWDG_SetWindow(WWDG_TypeDef *WWDGx, uint32_t Window)
Set the Watchdog Window value to be compared to the downcounter (7-bits W[6:0]).
__STATIC_INLINE uint32_t LL_WWDG_GetPrescaler(WWDG_TypeDef *WWDGx)
Return current Watchdog Prescaler Value @rmtoll CFR WDGTB LL_WWDG_GetPrescaler.
__STATIC_INLINE uint32_t LL_WWDG_IsEnabled(WWDG_TypeDef *WWDGx)
Checks if Window Watchdog is enabled @rmtoll CR WDGA LL_WWDG_IsEnabled.
__STATIC_INLINE uint32_t LL_WWDG_IsActiveFlag_EWKUP(WWDG_TypeDef *WWDGx)
Indicates if the WWDG Early Wakeup Interrupt Flag is set or not.
__STATIC_INLINE void LL_WWDG_ClearFlag_EWKUP(WWDG_TypeDef *WWDGx)
Clear WWDG Early Wakeup Interrupt Flag (EWIF) @rmtoll SR EWIF LL_WWDG_ClearFlag_EWKUP.
__STATIC_INLINE uint32_t LL_WWDG_IsEnabledIT_EWKUP(WWDG_TypeDef *WWDGx)
Check if Early Wakeup Interrupt is enabled @rmtoll CFR EWI LL_WWDG_IsEnabledIT_EWKUP.
__STATIC_INLINE void LL_WWDG_EnableIT_EWKUP(WWDG_TypeDef *WWDGx)
Enable the Early Wakeup Interrupt.