
DMA and Interrupts
11-42
11.10 DMA and Interrupts
The DMA coprocessor uses interrupts in the following way:
It can send interrupts to the CPU when a block transfer finishes. See the
TCC and AUX TCC bits in Figure 11–2.
It can receive interrupts from the external interrupt pins (IIOF3–0), the tim-
ers, or the communication port (ICRDY, OCRDY).
This section explains how the DMA receives interrupts. This process is called
synchronization.
All of the interrupts that the DMA coprocessor can see are first received by the
CPU interrupt controller. Edge-triggered interrupts are latched by the CPU in
the appropriate interrupt flag register; level-triggered interrupts are not.
When an external interrupt (IIOF3–0) is used for DMA coprocessor transfer
synchronization, the CPU is responsible for configuring external interrupts as
edge- or level-triggered interrupts (as set in the FUNCx and TYPEx bits of the
interrupt flag register (discussed in subsection 3.1.10, IIOF Flag Register
(IIF)), on page 3-13.
Edge-triggered
interrupts are timer interrupts, DMA interrupts, and external in-
terrupts that are configured as edge-triggered interrupts. Detailed information
on interrupts is provided in Section 7.4, Interrupts on page 7-15, and Section
7.6, DMA Interrupts on page 7-26. When the interrupt controller determines
that an edge-triggered interrupt that a DMA channel is waiting on (DIE regis-
ters bits set) has been latched into the interrupt flag, the CPU clears the inter-
rupt flag and sends an interrupt pulse to the DMA channel. The DMA channel
latches the interrupt locally until it can service the interrupt. At that time, the
latched interrupt is cleared by the DMA coprocessor for two cycles.
Level-triggered interrupts generated by communication ports and external in-
terrupts that are configured as level-triggered interrupts are handled differently
by the CPU interrupt controller. When the interrupt controller determines that
a level-triggered interrupt that a DMA channel is waiting for (DIE register bits
set) has been received, the CPU sends an interrupt pulse to the DMA channel.
The DMA channel latches the interrupt locally until it can service the interrupt.
At that time, the locally latched interrupt is cleared by the DMA coprocessor
for two cycles.
The interrupt reset signal generated by the DMA coprocessor after a DMA in-
terrupt is serviced has priority over the interrupt set signal. Thus, the interrupt
signal will not be continuously set, even if the CPU is continuously sending the
interrupt set signal. Therefore, when the DMA-set priority scheme is used and