505
Watchdog Timer (WDT)
Chapter 15
Preliminary User’s Manual U17566EE1V2UM00
(3)
WCMD - WDT command protection register
The 8-bit WCMD register is write-only. It is used to protect the WDTM and
WDCS registers from unintended writing.
Access
This register can be written in 8-bit units.
Address
<base> + 2
H
Initial Value
Undefined
Any data written to this register is ignored. Only the write action is monitored.
After writing to the WCMD register, you are permitted to write once to one of
the protected registers. This must be done immediately after writing to the
WCMD register. If the second write action does not follow immediately, the
protected registers are write-locked again. See also
“Write Protected
Registers“ on page 124
.
With this method, the protected registers can only be rewritten in a specific
sequence. Illegal write access to a protected register is inhibited.
The following registers are protected:
• WDCS:
Watchdog clock selection register
• WDTM:
Watchdog mode control register
An invalid write attempt to one of the above registers sets the error flag
WPHS.WPRERR. WPHS.WPRERR is also set, if a write access to WCMD is
not followed by an access to one of the protected registers.
Data read from the WCMD register is undefined.
Caution
In case a high level programming language is used, make sure that the
compiler translates the two write instructions to WCMD and the protected
register into two consecutive assembler “store” instructions.
7
6
5
4
3
2
1
0
X
X
X
X
X
X
X
X
W
W
W
W
W
W
W
W
electronic components distributor