
How to use the
Watchdog Timer of the TriCore
6 of 17
AP3219 Rel.02
Changes to the reload value WDTCON0.WDTREL, or the user-definable password
WDTCON0.WDTPW, are not required. However, changing WDTPW is recommended so
that software can monitor Watchdog Timer service operations throughout the duration of
an application program. If WDT service is properly executed, Time-out Mode is terminated,
and the Watchdog Timer switches back to its former mode of operation, and WDT service
is complete.
3
WDTSR is a read-only register and can be read at any time. Write accesses to this register
have no effect (no error is reported in such a case). Updating of the status bits in register
WDTSR is handled automatically in hardware. The two error flags, WDTCON1.WDTOE
and WDTCON1.WDTAE, are not cleared through a Watchdog reset (but through any other
reset). They are cleared with a successful access to WDTCON0 which sets ENDINIT to 1.
WDTCON1 can also be read at any time without any restrictions. Writing to this register is
only possible if bit ENDINIT is cleared to 0 (WDTCON1 is ENDINIT-protected). Updates
made to the bits in this register will go into effect after ENDINIT has been set to 1 again.
Access to WDTCON0 can be for any combination of the following reasons:
To perform routine service to forestall a Watchdog Timer overflow
To change fields in WDTCON0
To change fields in WDTCON1
To change other ENDINIT-protected system registers
All of these require unlocking WDTCON0 first. Proper access to WDTCON0 always
requires two write accesses. The first write, called the password access, unlocks
WDTCON0. The second write, called the modifying access, can change values in
WDTCON0. When the modifying access completes, WDTCON0 is locked again
automatically. If the modifying access sets WDTCON0.ENDINIT to 0, then other protected
system registers, such as WDTCON1, are unlocked and can be modified.
The access to the Watchdog Timer Registers
3.1
The password required to unlock WDTCON0 is comprised of the state of bits in
WDTCON0 and WDTCON1, as indicated in Table 3:
Password Access
Table 3
Password Requirements
Password Bit
0
2
3
7:4
15:8
31:16
Required Value
State of ENDINIT in register WDTCON0
Inverted state of WDTLCK in register WDTCON0
State of WDTIR in register WDTCON1
State of WDTDR in register WDTCON1
Always 1
Value of WDTPW in register WDTCON0
Value of WDTREL in register WDTCON0