ADSP-BF537 Blackfin Processor Hardware Reference
5-63
Direct Memory Access
If the counts are unequal, the software instead modifies the next-to-last
descriptor’s
DMAx_CONFIG
value so that its upper half (
FLOW
and
NDSIZE
)
now describes the newly queued descriptor. This operation does not dis-
rupt the DMA channel, provided the rest of the descriptor data structure
is initialized in advance. It is necessary, however, to synchronize the soft-
ware to the DMA to correctly determine whether the new or the old
DMAx_
CONFIG
value was read by the DMA channel.
This synchronization operation should be performed in the interrupt
handler. First, upon interrupt, the handler should read the channel’s
DMAx_IRQ_STATUS
register. If the
DMA_RUN
status bit is set, then the channel
has moved on to processing another descriptor, and the interrupt handler
may increment its count and exit. If the
DMA_RUN
status bit is not set, how-
ever, then the channel has paused, either because there are no more
descriptors to process, or because the last descriptor was queued too late
(that is, the modification of the next-to-last descriptor’s
DMAx_CONFIG
ele-
ment occurred after that element was read into the DMA unit.) In this
case, the interrupt handler should write the
DMAx_CONFIG
value appropriate
for the last descriptor to the DMA channel’s
DMAx_CONFIG
register, incre-
ment the completed descriptor count, and exit.
Again, this system can fail if the system’s interrupt latencies are large
enough to cause any of the channel’s DMA interrupts to be dropped. An
interrupt handler capable of safely synchronizing multiple descriptors’
interrupts would need to be complex, performing several MMR accesses to
ensure robust operation. In such a system environment, a minimal inter-
rupt synchronization method is preferred.
Descriptor Queue Using Minimal Interrupts
In this system, only one DMA interrupt event is possible in the queue at
any time. The DMA interrupt handler for this system can also be
extremely short. Here, the descriptor queue is organized into an “active”
and a “waiting” portion, where interrupts are enabled only on the last
descriptor in each portion.
Summary of Contents for Blackfin ADSP-BF537
Page 42: ...Contents xlii ADSP BF537 Blackfin Processor Hardware Reference ...
Page 90: ...Development Tools 1 32 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 138: ...Programming Examples 4 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 340: ...SDC Programming Examples 6 84 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 606: ...Programming Examples 9 94 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 660: ...Programming Examples 10 54 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 720: ...Electrical Specifications 11 60 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 840: ...Programming Examples 13 42 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 876: ...Programming Examples 14 36 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 938: ...Programming Examples 15 62 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 958: ...Programming Examples 17 12 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 986: ...Programming Examples 18 28 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1162: ...G 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1218: ...Index I 56 ADSP BF537 Blackfin Processor Hardware Reference ...