R01UH0823EJ0100 Rev.1.00
Page 827 of 1823
Jul 31, 2019
RX23W Group
30. Watchdog Timer (WDTA)
30.3
Operation
30.3.1
Count Operation in Each Start Mode
The WDT has two start modes: auto-start mode, in which counting automatically starts after a reset is released, and
register start mode, in which counting is started by refresh operation (writing to the register).
In auto-start mode, counting automatically starts after a reset is released in accordance with the settings in option
function select register 0 (OFS0) in the ROM.
In register start mode, counting is started by refresh operation (writing to the register) after the respective registers are set
after a reset is released.
Select auto-start mode or register start mode by setting the OFS0.WDTSTRT bit.
When the auto-start mode is selected, the settings in the WDTCR and WDTRCR registers are disabled, and the settings
in the OFS0 register are enabled.
On the other hand, when the register start mode is selected, the setting of the OFS0 register is disabled, and the settings of
the WDTCR and WDTRCR registers are enabled.
30.3.1.1
Register Start Mode
When the OFS0.WDTSTRT bit is 1, register start mode is selected, and the WDTCR and WDTRCR registers are
enabled.
After a reset is released, set the clock division ratio, window start and end positions, and timeout period in the WDTCR
register, and the reset output or interrupt request output in the WDTRCR register. Then, refresh the down-counter to start
counting down from the value set by the WDTCR.TOPS[1:0] bits.
Thereafter, as long as the counter is refreshed in the refresh-permitted period, the value in the counter is re-set each time
the counter is refreshed and counting down continues. The WDT does not output the reset signal as long as this
continues. However, if the down-counter underflows because the down-counter cannot be refreshed due to a program
runaway, or if a refresh error occurs because the counter was refreshed outside the refresh-permitted period, the WDT
outputs a reset signal or a non-maskable interrupt request (WUNI). Reset output or interrupt request output can be
selected by setting the WDTRCR.RSTIRQS bit.
shows an example of operation under the following conditions.
Register start mode (OFS0.WDTSTRT = 1)
Reset output is enabled (WDTRCR.RSTIRQS = 1)
The window start position is 75% (WDTCR.RPSS[1:0] = 10b)
The window end position is 25% (WDTCR.RPES[1:0] = 10b)