
D
Set
Q
IRQ, Interrupt Service Requested
Reset
Timer Clock
POR
CAP
EQU0
Capture
IRACC, Interrupt Request Accepted
CCIE
Timer_A Operation
11.2.6 Timer_A Interrupts
Two interrupt vectors are associated with the 16-bit Timer_A module:
•
interrupt vector for TAxCCR0 CCIFG
•
interrupt vector for all other CCIFG flags and TAIFG
In capture mode, any CCIFG flag is set when a timer value is captured in the associated TAxCCRn
register. In compare mode, any CCIFG flag is set if
counts
to the associated TAxCCRn value.
Software may also set or clear any CCIFG flag. All CCIFG flags request an interrupt when their
corresponding CCIE bit and the GIE bit are set.
11.2.6.1 TAxCCR0 Interrupt
The
CCIFG flag has the highest Timer_A interrupt priority and has a dedicated interrupt vector
as shown in
. The TAxCCR0 CCIFG flag is automatically reset when the TAxCCR0 interrupt
request is serviced.
Figure 11-15. Capture/Compare
Interrupt Flag
11.2.6.2 TAxIV, Interrupt Vector Generator
The TAxCCRy CCIFG flags and TAIFG flags are prioritized and combined to source a single interrupt
vector. The interrupt vector register
is used to determine which flag requested an interrupt.
The highest-priority enabled interrupt generates a number in the
register (see register description).
This number can be evaluated or added to the program counter to automatically enter the appropriate
software routine. Disabled Timer_A interrupts do not affect the TAxIV value.
Any access, read or write, of the
register automatically resets the highest-pending interrupt flag. If
another interrupt flag is set, another interrupt is immediately generated after servicing the initial interrupt.
For example, if the
and
CCIFG flags are set when the interrupt service routine
accesses the TAxIV register, TAxCCR1 CCIFG is reset automatically. After the RETI instruction of the
interrupt service routine is executed, the TAxCCR2 CCIFG flag generates another interrupt.
347
SLAU272C – May 2011 – Revised November 2013
Timer_A
Copyright © 2011–2013, Texas Instruments Incorporated