100 #define WWDG_OFFSET (WWDG_BASE - PERIPH_BASE)
102 #define CFR_OFFSET (WWDG_OFFSET + 0x04)
103 #define EWI_BitNumber 0x09
104 #define CFR_EWI_BB (PERIPH_BB_BASE + (CFR_OFFSET * 32) + (EWI_BitNumber * 4))
108 #define CFR_WDGTB_MASK ((uint32_t)0xFFFFFE7F)
109 #define CFR_W_MASK ((uint32_t)0xFFFFFF80)
110 #define BIT_MASK ((uint8_t)0x7F)
158 assert_param(IS_WWDG_PRESCALER(WWDG_Prescaler));
160 tmpreg = WWDG->CFR & CFR_WDGTB_MASK;
162 tmpreg |= WWDG_Prescaler;
175 __IO uint32_t tmpreg = 0;
178 assert_param(IS_WWDG_WINDOW_VALUE(WindowValue));
181 tmpreg = WWDG->CFR & CFR_W_MASK;
184 tmpreg |= WindowValue & (uint32_t) BIT_MASK;
198 *(__IO uint32_t *) CFR_EWI_BB = (uint32_t)ENABLE;
211 assert_param(IS_WWDG_COUNTER(Counter));
214 WWDG->CR = Counter & BIT_MASK;
242 assert_param(IS_WWDG_COUNTER(Counter));
243 WWDG->CR = WWDG_CR_WDGA | Counter;
268 FlagStatus bitstatus = RESET;
270 if ((WWDG->SR) != (uint32_t)RESET)
288 WWDG->SR = (uint32_t)RESET;
This file contains all the functions prototypes for the RCC firmware library.
void WWDG_DeInit(void)
Deinitializes the WWDG peripheral registers to their default reset values.
void WWDG_SetPrescaler(uint32_t WWDG_Prescaler)
Sets the WWDG Prescaler.
void WWDG_SetWindowValue(uint8_t WindowValue)
Sets the WWDG window value.
This file contains all the functions prototypes for the WWDG firmware library.
FlagStatus WWDG_GetFlagStatus(void)
Checks whether the Early Wakeup interrupt flag is set or not.
void WWDG_EnableIT(void)
Enables the WWDG Early Wakeup interrupt(EWI).
void WWDG_ClearFlag(void)
Clears Early Wakeup interrupt flag.
void WWDG_SetCounter(uint8_t Counter)
Sets the WWDG counter value.
void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState)
Forces or releases Low Speed APB (APB1) peripheral reset.
void WWDG_Enable(uint8_t Counter)
Enables WWDG and load the counter value.