
Interrupts
7-15
Program Flow Control
7.4
Interrupts
The ’C4x supports multiple internal and external interrupts, which can be used
for a variety of applications. Internal interrupts are generated by the DMA con-
troller, the timers, and the communication ports. The five external interrupt pins
include four external maskable interrupt pins (IIOF0–IIOF3) and one non-
maskable interrupt (NMI) pin. Interrupts can be sent to both the CPU and the
DMA controller.
Interrupts on the ’C4x are automatically prioritized. This allows interrupts that
occur simultaneously to be serviced in a predefined order.
This section discusses the operation of these interrupts. Additional information
regarding internal interrupts can be found in Section 12.6, Coordinating Com-
munication Ports with the CPU and DMA Processor on page 12-17, Section
11.10, DMA and Interrupts on page 11-42, and Chapter 13, Timers See Sec-
tion 7.6, DMA Interrupts on page 7-26, for more information about interrupts
to the DMA controller.
7.4.1
Interrupt Vector Table and Prioritization
The interrupt vector table (IVT) shown in Figure 7–2 contains the interrupt vec-
tors. An interrupt vector is an address of an interrupt service routine that should
start executing when an interrupt is received. The IVT table must be placed on
a 512-word memory boundary. The table location is determined by the value
that is stored in the IVTP register (see Section 3.2, CPU Expansion Register
File on page 3-17).
Prioritizationmeans that an interrupt in a higher position in the interrupt vector
table (Figure 7–2) is serviced before one in a lower position when both are re-
ceived in the same clock cycle or when two previously received interrupts are
waiting to be serviced . It does
not
mean, for example, that IIOF3 must wait
until service routines for IIOF2, IIOF1, and IIOF0 are completed (when
ST(GIE) = 1).
The priority of interrupts is handled by the CPU according to the interrupt vec-
tor table. Priority is set according to position in the table — those with displace-
ments closest to the IVTP base address are higher in priority (i.e., NMI is higher
than TINT0, which is higher than IIOF0, etc.). Note that interrupt TINT0 is lo-
cated at IVTP + 2, while the TINT1 vector is located at IVTP + 2Bh after the
communication port and DMA coprocessor interrupts.