
DMA and Interrupts
11-43
The DMA Coprocessor
a higher priority DMA channel is driven by continuous interrupt signals, the
lower priority DMA channel can be serviced in between the higher priority DMA
services.
Unlike the ’C3x, the ’C4x DMA processor is not affected by processing the
CPU interrupts, even when pipeline fetches are being halted. When interrupts
are enabled in the DIE register, the interrupt is latched automatically by the
CPU interrupt controller and saved for future DMA use. When a flag interrupt
(timer, external interrupt) is latched, the IIF flag is cleared. Note that IIF flags
are cleared when the CPU interrupt controller latches the interrupt, not when
the DMA responds to it. Even if the DMA has not been started, the interrupt
latch occurs, except when the start bits in the DMA control register have the
reset value (00
2
in the START or AUX START bits). DMA reset clears the inter-
rupt internal latch. To avoid losing previously received interrupts, it is recom-
mended that you initialize DIE register after starting the DMA, when the DMA
start bits have the value 11
2
. Note that when the DMA completes a transfer,
the start (AUXSTART) bits are set to 10
2
. For this reason, the DMA will not miss
any interrupt between transfers.
The DMA and the CPU can respond to the same interrupt if the CPU is not in-
volved in any pipeline conflict or in any instruction that halts instruction fetch-
ing. Refer to subsection 7.4.1, Interrupt Vector Table and Prioritization on
page 7-15 for more details. It is also possible for different DMA channels (in-
cluding auxiliary and primary channels) to respond to the same interrupt. If the
same interrupt is selected for source and destination synchronization, both
read and write cycles are enabled with a single incoming interrupt.
The internal circuitry of the ’C4x guarantees proper operation between a com-
munication port that generates level-triggered interrupts and the DMA channel
that is synchronizing with those level-triggered interrupts.
Note:
When you synchronize the DMA channels with external interrupts, it is better
to configure the interrupt lines as edge-triggered interrupts to ensure that
only one interrupt is recognized
.
11.10.1
Interrupts and Synchronization of DMA Channels
You can use interrupts to synchronize DMA channel transfers. To set up the
DMA for a synchronous data transfer mode requires two steps:
1)
Set the DMA SYNC MODE bits (bits 6,7) in the DMA channel control regis-
ter to the value for the source, destination, or source and destination syn-
chronization desired. See subsection 11.10.2, Synchronization Mode Bits
for more information.