Source Clock; Wdt Timer Counter; Register Protection; Warning Interrupt - Infineon XMC7000 Series Using Manual

Using the watchdog timer
Hide thumbs Also See for XMC7000 Series:
Table of Contents

Advertisement

Using the Watchdog Timer in XMC7000 family MCUs
Basic WDT
watchdog servicing timing to fulfill the window timing conditions. If the LOWER_ACTION bit is not set, the Basic
WDT can be serviced anytime before the UPPER_LIMIT value is reached.
2.1

Source clock

The source clock that can be selected for the Basic WDT is fixed to the ILO0 clock: 32.768 kHz.
2.2

WDT timer counter

The Basic WDT count width is 32 bits. Therefore, the timer period that can be set is between 30.518 µs and
131,072 s. These values are calculated with the typical ILO0 timing. Tolerances must also be considered. See
the device datasheet for details.
2.3

Register protection

Changing the register values that are used to configure the Basic WDT requires an UNLOCK sequence of the
WDT_LOCK[1:0] bits located in the LOCK register. The following write access sequence to the WDT_LOCK bit
field must be performed for unlocking CNT, CTL, LOWER_LIMIT, UPPER_LIMIT, WARN_LIMIT, CONFIG, and
SERVICE registers:
WDT_LOCK = 1
WDT_LOCK = 2
To regain the lock for the Basic WDT registers, one single access to the LOCK register is required:
WDT_LOCK = 3
Check the lock status by reading the WDT_LOCK register. If the read value is not equal to '0', it indicates that
Basic WDT registers are locked.
After a transition from DeepSleep or Hibernate mode to Active mode, all basic WDT registers are locked.
2.4

Warning interrupt

The basic WDT supports a WARN limit that can be used to define a dedicated timing to generate an interrupt. It
can be used for different purposes such as follows:
Pre-warning event: The WARN_LIMIT value is defined as lower than the UPPER_LIMIT value. It is enabled if
the WARN_ACTION[8] bit in the CONFIG register is set to '1'. Note that you should use adequate limits to
execute the WARN interrupt in time.
Wakeup event: The basic WDT can be used as a simple wakeup timer by setting the warning interrupt for
the desired wakeup time period. The watchdog counter can send interrupt requests to the wakeup interrupt
controller (WIC) in Sleep and DeepSleep power modes. In addition, the basic WDT is capable of waking up
the device from Hibernate power mode. This can be used with or without the normal watchdog reset
behavior.
The configuration of wakeup from Hibernate mode is done in the PWR_HIBERNATE register. See the "System
Resources Registers" chapter in the Technical Reference Manual (TRM) for more details.
The basic WDT can be serviced automatically by setting the AUTO_SERVICE[12] bit to '1' in the CONFIG
register. Setting up automatic servicing of the basic WDT creates a periodic interrupt if the basic WDT
counter is not used as a watchdog timer with the timeout reset function. This means that the
LOWER_ACTION[0] and UPPER_ACTION[1] bits are set to '0' in the CONFIG register. Servicing the basic WDT
counter in the corresponding interrupt service routine (ISR) is not required. The basic WDT counter is
serviced by the hardware.
Application Note
5 of 33
002-33887 Rev. *A
2022-05-25

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xmc7100 seriesXmc7200 series

Table of Contents