
How to use the
Watchdog Timer of the TriCore
9 of 17
AP3219 Rel.02
4
How to change the Watchdog Timer Registers
4.1
The first step to change the WDTCON0 register is to unlock it with the Password Access
by a procedure as stated further above. This unlocked condition is indicated by
WDTLCK=0. The register WDTCON0 is now unlocked and you can proceed with a modify
access.
How to change the WDTCON0
It is recommended to use the procedure
WDT_Modify(Mask, Modify)
further above, in
order to avoid protocol errors. The following tables will show you how to set the values of
the variables “Mask” and “Modify”. The result values for the variables “Mask” and “Modify”
must be combined by a disjunction of the individual values.
Note:
You can configure only the WDTCON registers.
Table 4
How to set the variable Mask
Which value do you want to change
Required Value for
variable “MASK”
ENDINIT
Reload Value
0x0000 000F
0xFFFF 0000
User-definable Password
0x0000 FF00
Example Result value for the variable “Mask”
o change the value of ENDINIT and the Reload Value
(combined by a disjunction of the individual values)
0xFFFF 000F
Table 5
How to set the variable Modify
Value of the variable
Value
Required Value for
variable “Modify”
ENDINIT
0
1
YYYY
0x0000 0000
0x0000 000F
0xYYYY 0000
Reload Value
YYYY is a user-definable hexvalue of 16bit from
0x0000 to 0xFFFF (see chapter “Normal Timer
Period” for hints)
User-definable Password
ZZ is a User-definable Hexvalue of 8bit from 0x00
to 0xFF (see chapter “Extended Security” for hints
how to set this value)
ZZ
0x0000 ZZ00
Example Result value for the variable “Modify”
o change the value of the ENDINIT bit to 1 and the
Reload Value to 0xABCD (combined by a
disjunction of the individual values)
0xABCD 000F
Now you can use the procedure
WDT_Modify(Mask, Modify)
with the calculated
values. The register WDTCON0 will be changed and locked after this access again.