Datasheet

Table Of Contents
Section 14 16-Bit Timer Pulse Unit (TPU)
Rev. 2.00 Jul. 04, 2007 Page 305 of 692
REJ09B0309-0200
14.6 Interrupt Sources
There are two kinds of TPU interrupt source; TGR input capture/compare match and TCNT
overflow. Each interrupt source has its own status flag and enable/disable bit, allowing the
generation of interrupt request signals to be enabled or disabled individually.
When an interrupt source is generated, the corresponding status flag in TSR is set to 1. If the
corresponding enable/disable bit in TIER is set to 1 at this time, an interrupt is requested. The
interrupt request is cleared by clearing the status flag to 0.
Mask levels within a channel can be changed by the interrupt controller. For details, see section 4,
Interrupt Controller.
Table 14.13 lists the TPU interrupt sources.
Table 14.13 TPU Interrupts
Channel Name Interrupt Source Interrupt Flag Priority
1 TGI1A TGRA_1 input capture/compare match TGFA_1 High
TGI1B TGRB_1 input capture/compare match TGFB_1
TCI1V TCNT_1 overflow TCFV_1
2 TGI2A TGRA_2 input capture/compare match TGFA_2
TGI2B TGRB_2 input capture/compare match TGFB_2
TCI2V TCNT_2 overflow TCFV_2 Low
(1) Input Capture/Compare Match Interrupt
An interrupt is requested if the TGIE bit in TIER is set to 1 when the TGF flag in TSR is set to 1
by the occurrence of a TGR input capture/compare match on a particular channel. The interrupt
request is cleared by clearing the TGF flag to 0. The TPU has a total of four input capture/compare
match interrupts, two for each channel.
(2) Overflow Interrupt
An interrupt is requested if the TCIEV bit in TIER is set to 1 when the TCFV flag in TSR is set to
1 by the occurrence of TCNT overflow on a channel. The interrupt request is cleared by clearing
the TCFV flag to 0. The TPU has a total of two overflow interrupts, one for each channel.