Iwdg Hal Driver Macros List; How To Use This Driver; Initialization And Start Functions; Io Operation Functions - ST STM32F2 User Manual

Description of stm32f2 hal and low layer drivers
Hide thumbs Also See for STM32F2:
Table of Contents

Advertisement

HAL IWDG Generic Driver
Min-max timeout value @32KHz (LSI): ~125us / ~32.7s The IWDG timeout may vary due
to LSI frequency dispersion. STM32F2xx devices provide the capability to measure the LSI
frequency (LSI clock connected internally to TIM5 CH4 input capture). The measured value
can be used to have an IWDG timeout with an acceptable accuracy.
27.2.2

How to use this driver

1.
Use IWDG using HAL_IWDG_Init() function to : (+) Enable instance by writing Start
keyword in IWDG_KEY register. LSI clock is forced ON and IWDG counter starts
downcounting. (+) Enable write access to configuration register: IWDG_PR &
IWDG_RLR. (+) Configure the IWDG prescaler and counter reload value. This reload
value will be loaded in the IWDG counter each time the watchdog is reloaded, then the
IWDG will start counting down from this value. (+) wait for status flags to be reset"
2.
Then the application program must refresh the IWDG counter at regular intervals
during normal operation to prevent an MCU reset, using HAL_IWDG_Refresh()
function.
(#) Use IWDG using HAL_IWDG_Init() function to :
Enable instance by writing Start keyword in IWDG_KEY register. LSI clock is forced
ON and IWDG counter starts downcounting.
Enable write access to configuration register: IWDG_PR & IWDG_RLR.
Configure the IWDG prescaler and counter reload value. This reload value will be
loaded in the IWDG counter each time the watchdog is reloaded, then the IWDG will
start counting down from this value.
wait for status flags to be reset" (#) Then the application program must refresh the
IWDG counter at regular intervals during normal operation to prevent an MCU reset,
using HAL_IWDG_Refresh() function.

IWDG HAL driver macros list

Below the list of most used macros in IWDG HAL driver:
__HAL_IWDG_START: Enable the IWDG peripheral
__HAL_IWDG_RELOAD_COUNTER: Reloads IWDG counter with value defined in
the reload register
27.2.3

Initialization and Start functions

This section provides functions allowing to:
Initialize the IWDG according to the specified parameters in the IWDG_InitTypeDef of
associated handle.
Once initialization is performed in HAL_IWDG_Init function, Watchdog is reloaded in
order to exit function with correct time base.
This section contains the following APIs:
HAL_IWDG_Init()
27.2.4

IO operation functions

This section provides functions allowing to:
Refresh the IWDG.
This section contains the following APIs:
HAL_IWDG_Refresh()
348/1371
DocID028236 Rev 2
UM1940

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F2 and is the answer not in the manual?

Table of Contents

Save PDF