Rev.6.00 Oct.28.2004 page 459
of 1016
REJ09B0138-0600H
13.2.4
Notes on Register Access
The watchdog timer’s TCNT, TCSR, and RSTCSR registers differ from other registers in being more difficult to write to.
The procedures for writing to and reading these registers are given below.
Writing to TCNT and TCSR: These registers must be written to by a word transfer instruction. They cannot be written
to with byte instructions.
Figure 13-2 shows the format of data written to TCNT and TCSR. TCNT and TCSR both have the same write address.
For a write to TCNT, the upper byte of the written word must contain H'5A and the lower byte must contain the write data.
For a write to TCSR, the upper byte of the written word must contain H'A5 and the lower byte must contain the write data.
This transfers the write data from the lower byte to TCNT or TCSR.
TCNT write
TCSR write
Address: H'FFBC
Address: H'FFBC
H'5A
Write data
15
8 7
0
H'A5
Write data
15
8 7
0
Figure 13-2 Format of Data Written to TCNT and TCSR
Writing to RSTCSR: RSTCSR must be written to by word transfer instruction to address H'FFBE. It cannot be written to
with byte instructions.
Figure 13-3 shows the format of data written to RSTCSR. The method of writing 0 to the WOVF bit differs from that for
writing to the RSTE and RSTS bits.
To write 0 to the WOVF bit, the write data must have H'A5 in the upper byte and H'00 in the lower byte. This clears the
WOVF bit to 0, but has no effect on the RSTE and RSTS bits. To write to the RSTE and RSTS bits, the upper byte must
contain H'5A and the lower byte must contain the write data. This writes the values in bits 6 and 5 of the lower byte into
the RSTE and RSTS bits, but has no effect on the WOVF bit.
H'A5
H'00
15
8 7
0
H'5A
Write data
15
8 7
0
Writing 0 to WOVF bit
Writing to RSTE and RSTS bits
Address: H'FFBE
Address: H'FFBE
Figure 13-3 Format of Data Written to RSTCSR
Reading TCNT, TCSR, and RSTCSR: These registers are read in the same way as other registers. The read addresses
are H'FFBC for TCSR, H'FFBD for TCNT, and H'FFBF for RSTCSR.
Summary of Contents for ZTAT H8S/2357F
Page 4: ......
Page 28: ...Rev 6 00 Oct 28 2004 page xxiv of xxiv REJ09B0138 0600H...
Page 82: ...Rev 6 00 Oct 28 2004 page 54 of 1016 REJ09B0138 0600H...
Page 108: ...Rev 6 00 Oct 28 2004 page 80 of 1016 REJ09B0138 0600H...
Page 364: ...Rev 6 00 Oct 28 2004 page 336 of 1016 REJ09B0138 0600H...
Page 438: ...Rev 6 00 Oct 28 2004 page 410 of 1016 REJ09B0138 0600H...
Page 566: ...Rev 6 00 Oct 28 2004 page 538 of 1016 REJ09B0138 0600H...
Page 588: ...Rev 6 00 Oct 28 2004 page 560 of 1016 REJ09B0138 0600H...
Page 688: ...Rev 6 00 Oct 28 2004 page 660 of 1016 REJ09B0138 0600H...
Page 694: ...Rev 6 00 Oct 28 2004 page 666 of 1016 REJ09B0138 0600H...
Page 708: ...Rev 6 00 Oct 28 2004 page 680 of 1016 REJ09B0138 0600H...
Page 1044: ...Rev 6 00 Oct 28 2004 page 1016 of 1016 REJ09B0138 0600H...