RX610 Group
19. Watchdog Timer (WDT)
R01UH0032EJ0120 Rev.1.20
Page 605 of 1006
Feb 20, 2013
19.5
Usage Notes
19.5.1
Notes on Register Access
The watchdog timer's TCNT, TCSR, and RSTCSR differ from other registers in being more difficult to write to.
(1) Writing to TCNT Counter, TCSR Register, and RSTCSR Register
When writing to TCNT and TCSR, be sure to use a word transfer instruction to the write window A register (WINA)
(00088028h). For writing, TCNT and TCSR are assigned to the same address. Accordingly, perform data transfer as
shown in figure 19.4.
To write to TCNT, set 5Ah in the upper byte and data in the lower byte, and perform data transfer to TCNT.
To write to TCSR, set A5h in the upper byte and data in the lower byte, and perform data transfer to TCSR.
When writing to RSTCSR, use a word transfer instruction to the write window B register (WINB) (0008802Ah).
The method of writing 0 to the WOVF flag in RSTCSR differs from that of writing to the RSTE bit in RSTCSR.
To write 0 to the WOVF flag, set A5h in the upper byte and 00h in the lower byte and use 16-bit access, as shown in
figure 19.4. This has no effect on the RSTE bit.
To write to the RSTE bit, set A5h in the upper byte and data to be written to RSTCSR in the lower byte and use 16-bit
access, as shown in figure 19.4. This has no effect on the WOVF flag.
<Writing to TCNT>
Data to be written to TCNT
5Ah
15
8 7
0
Address: 0008 8028h (WINA)
< Writing to TCSR >
Data to be written to TCSR
A5h
15
8 7
0
Address: 0008 8028h (WINA)
<Writing to RSTE bit in RSTCSR>
Data to be written to RSTCSR
5Ah
15
8 7
0
Address: 0008 802Ah (WINB)
<Writing 0 to WOVF flag in RSTCSR>
A5h
00h
15
8 7
0
Address: 0008 802Ah (WINB)
Figure 19.4 Writing to TCNT, TCSR, and RSTCSR
Summary of Contents for RX600 Series
Page 1006: ...RX610 Group R01UH0032EJ0120 ...