Programming Model
7-60
ADSP-BF50x Blackfin Processor Hardware Reference
When each new DMA request is processed, the software’s non-interrupt
code fills in a new descriptor’s contents and adds it to the waiting portion
of the queue. The descriptor’s
DMAx_CONFIG
word should have a
FLOW
value
of zero. If more than one request is received before the DMA queue com-
pletion interrupt occurs, the non-interrupt code should queue later
descriptors, forming a waiting portion of the queue that is disconnected
from the active portion of the queue being processed by the DMA unit. In
other words, all but the last active descriptors contain
FLOW
values
4 and
have no interrupt enable set, while the last active descriptor contains a
FLOW
of 0 and an interrupt enable bit
DI_EN
set to 1. Also, all but the last
waiting descriptors contain
FLOW
values
4 and no interrupt enables set,
while the last waiting descriptor contains a
FLOW
of 0 and an interrupt
enable bit set. This ensures that the DMA unit can automatically process
the whole active queue and then issue one interrupt. Also, this arrange-
ment makes it easy to start the waiting queue within the interrupt handler
with a single
DMAx_CONFIG
register write.
After queuing a new waiting descriptor, the non-interrupt software should
leave a message for its interrupt handler in a memory mailbox location
containing the desired
DMAx_CONFIG
value to use to start the first waiting
descriptor in the waiting queue (or 0 to indicate no descriptors are
waiting).
Once processing by the DMA unit has started, it is critical that the soft-
ware not directly modify the contents of the active descriptor queue unless
careful synchronization measures are taken. In the most straightforward
implementation of a descriptor queue, the DMA manager software would
never modify descriptors on the active queue; instead, the DMA manager
waits until the DMA queue completion interrupt indicates the processing
of the entire active queue is complete.
When a DMA queue completion interrupt is received, the interrupt han-
dler reads the mailbox from the non-interrupt software and writes the
value in it to the DMA channel’s
DMAx_CONFIG
register. This single register
write restarts the queue, effectively transforming the waiting queue to an
Summary of Contents for EZ-KIT Lite ADSP-BF506F
Page 50: ...Contents l ADSP BF50x Blackfin Processor Hardware Reference ...
Page 92: ...Development Tools 1 30 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 110: ...Interface Overview 3 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 236: ...Internal Flash Memory Control Registers 6 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 650: ...Programming Examples 15 56 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 804: ...Programming Examples 17 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1194: ...Programming Examples 24 90 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1256: ...ACM Registers A 50 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1264: ...Boundary Scan Architecture B 8 ADSP BF50x Blackfin Processor Hardware Reference ...