EasyManua.ls Logo

ST STM32F31xx

ST STM32F31xx
584 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Window watchdog (WWDG)
UM1581
578/584
DocID023800 Rev 1
24.2.2 How to use this driver
1. Enable WWDG clock using RCC_APB1PeriphClockCmd(RCC_APB1Periph_WWDG,
ENABLE) function.
2. Configure the WWDG prescaler using WWDG_SetPrescaler() function.
3. Configure the WWDG refresh window using WWDG_SetWindowValue() function.
4. Set the WWDG counter value and start it using WWDG_Enable() function. When the
WWDG is enabled the counter value should be configured to a value greater than
0x40 to prevent generating an immediate reset.
5. Optionally you can enable the Early wakeup interrupt which is generated when the
counter reach 0x40. Once enabled this interrupt cannot be disabled except by a
system reset.
6. Then the application program must refresh the WWDG counter at regular intervals
during normal operation to prevent an MCU reset, using WWDG_SetCounter()
function. This operation must occur only when the counter value is lower than the
refresh window value, programmed using WWDG_SetWindowValue().
24.2.3 Prescaler, Refresh window and Counter configuration functions
WWDG_DeInit()
WWDG_SetPrescaler()
WWDG_SetWindowValue()
WWDG_EnableIT()
WWDG_SetCounter()
24.2.4 WWDG activation function
WWDG_Enable()
24.2.5 Interrupts and flags management functions
WWDG_GetFlagStatus()
WWDG_ClearFlag()
24.2.6 Prescaler, Refresh window and Counter configuration functions
24.2.6.1 WWDG_DeInit
Function Name
void WWDG_DeInit ( void )
Function Description
Deinitializes the WWDG peripheral registers to their default reset
values.
Parameters
None.
Return values
None.
Notes
None.

Table of Contents

Related product manuals