
314
CHAPTER 12 WATCH PRESCALER
12.4 Watch Prescaler Interrupt
The watch prescaler generates an interrupt request at the falling edge of the specific
divided output (interval timer function).
s Interrupts for Interval Timer Function (Watch Interrupt)
The watch prescaler counter counts up, clocked by the subclock source oscillation. Unless the
system is in main-stop mode, the watch interrupt request flag is set to "1" (WPCR: WIF = 1) at
the end of the selected time interval. At this time, an interrupt request (IRQ8) to the CPU is
generated if the interrupt request enable bit is enabled (WPCR: WIE = "1"). Write "0" to the WIF
bit in the interrupt processing routine to clear the interrupt request. The WIF bit is set when the
specified divide output falls, regardless of the WIE bit value.
Check:
When enabling an interrupt request output (WE = "1") after wake-up from a reset, always
clear the WIF bit (WIF = "0") at the same time.
Notes:
An interrupt request is generated immediately if the WIF bit is "1" when the WIF bit is
changed from disabled to enabled ("0" --> "1").
The WIF bit is not set if the counter cleared (WPCR: WCLR = "0") at the same time as an
overflow on the specified bit occurs.
s Oscillation Stabilization Delay Time and Watch Interrupt
If the interval time is set shorter than the subclock oscillation stabilization delay time, an watch
interrupt request from the watch prescaler (WPCR: WIF ="1") is generated at the time when
CPU wakes up from sub-stop mode by an external interrupt. In this case, disable the watch
prescaler interrupt (WPCR: WIE = "0") when changing to sub-stop mode.
s Register and Vector Table for Watch Prescaler Interrupt
Table 12.4-1 "Register and Vector for Watch Prescaler Interrupt" lists the register and vector
table for watch prescaler interrupt.
Reference:
See Section 3.4.2 "Interrupt Processing" for details on the interrupt operations.
Table 12.4-1 Register and Vector for Watch Prescaler Interrupt.
Interrupt
Interrupt level settings register
Vector table address
Register
Setting bits
Upper
Lower
IRQ8
ILR3 (007EH)
L81 (bit 1)
L80 (bit 0)
FFEAH
FFEBH