This function modifies the WDOG CTRL register which requires synchronization into the low-frequency domain. If this register is modified before a previous update to the same register has completed, this function will stall until the previous synchronization has completed.

Parameters

[in]

wdog

A pointer to the WDOG peripheral register block.

[in]

enable

True to enable Watchdog, false to disable. Watchdog cannot be disabled if it's been locked.

Initialize WDOG (assuming the WDOG configuration has not been locked).

Note

This function modifies the WDOG CTRL register which requires synchronization into the low-frequency domain. If this register is modified before a previous update to the same register has completed, this function will stall until the previous synchronization has completed.

Parameters

[in]

wdog

Pointer to the WDOG peripheral register block.

[in]

init

The structure holding the WDOG configuration. A default setting WDOG_INIT_DEFAULT is available for initialization.

This prevents errors from overwriting the WDOG configuration, possibly disabling it. Only a reset can unlock the WDOG configuration once locked.

If the LFRCO or LFXO clocks are used to clock WDOG, consider using the option of inhibiting those clocks to be disabled. See the WDOG_Enable() initialization structure.

Note

This function modifies the WDOG CTRL register which requires synchronization into the low-frequency domain. If this register is modified before a previous update to the same register has completed, this function will stall until the previous synchronization has completed.