192
CHAPTER 7 WATCH PRESCALER
7.4
Watch Prescaler Interrupt
The watch prescaler generates interrupt requests using the falling edges of the
selected divide-by output (interval timer function).
I
Interrupt when the Interval Timer Function is Active (Watch Interrupt)
The counter for the watch prescaler counts up using the subclock oscillation. When the
specified interval time passes, if not in main stop mode, the watch interrupt request flag bit
(WPCR: WIF=1) is set to "1". At this time, if the interrupt request enable bit is set (WPCR:
WIE=1), an interrupt request to CPU (IRQ8) is issued. Clear the interrupt request to "0" by
writing "0" into the WIF bit using an interrupt processing routine. The WIF bit is set whenever
the specified divide-by output falls regardless of the value of the WIE bit.
Note:
To allow interrupt request output (WIE=1) after releasing a reset, clear (WIF=0) the WIF bit
at the same time.
If the WIE bit is changed from prohibition to permission (0 --> 1) when the WIF bit is "1", an
interrupt request is issued immediately.
If the counter clear (WPCR: WCLR=0) and an overflow of the selected bit occur at the same
time, the WIF bit is not set.
I
Oscillation Stabilization Wait Time and Watch Interrupts
If an interval time period shorter than the oscillation stabilization wait time of the subclock is set,
a watch interrupt request (WPCR: WIF=1) of the watch prescaler is issued when returning from
the sub-stop mode following an external interrupt. In this case, prohibit (WPCR: WIE=0)
interrupts of the watch prescaler when making a transition to the sub-stop mode.
I
Register and Vector Table Related to the Watch Prescaler Interrupts
Table 7.4-1 "Register and Vector Table Related to the Watch Prescaler Interrupts" lists the
register and vector table related to the watch prescaler interrupts.
For interrupt operations, see Section 3.4.2 "Interrupt Processing".
Table 7.4-1 Register and Vector Table Related to the Watch Prescaler Interrupts
Interrupt
name
Interrupt level setting register
Vector table address
Register
Bit to be set
Upper
Lower
IRQ8
ILR3 (007D
H
)
L81 (bit 1)
L80 (bit 0)
FFEA
H
FFEB
H