TCNT value
TCOR
H'00000000
TCLK
TCPR2
TICPI2
Figure 12.7 Operation Timing when Using Input Capture Function
12.4
Interrupts
There are four TMU interrupt sources, comprising underflow interrupts and the input capture
interrupt (when the input capture function is used). Underflow interrupts are generated on
channels 0 to 2, and input capture interrupts on channel 2 only.
An underflow interrupt request is generated (for each channel) according to the AND of UNF and
the interrupt enable bit (UNIE) in TCR.
When the input capture function is used and an input capture request is generated, an interrupt is
requested if the input capture input flag (ICPF) in TCR2 is 1 and the input capture control bits
(ICPE1, ICPE0) in TCR2 are 11.
The TMU interrupt sources are summarized in table 12.3.
Table 12.3 TMU Interrupt Sources
Channel
Interrupt Source
0
TUNI0
1
TUNI1
2
TUNI2
TICPI2
TCOR value set in TCNT
on underflow
TCNT value set
Description
Underflow interrupt 0
Underflow interrupt 1
Underflow interrupt 2
Input capture interrupt 2
Priority
High
↑
↓
Low
Rev. 4.0, 04/00, page 255 of 850
Time