
Programming Model
5-58
ADSP-BF59x Blackfin Processor Hardware Reference
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
(the modification of the next-to-last descriptor’s
DMAx_CONFIG
element
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, increment 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.
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
Содержание ADSP-BF59x Blackfin
Страница 64: ...Development Tools 1 22 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 74: ...Processor Specific MMRs 2 10 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 204: ...Unique Information for the ADSP BF59x Processor 5 104 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 244: ...Programming Examples 6 40 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 345: ...ADSP BF59x Blackfin Processor Hardware Reference 9 9 Core Timer Unique Information for the ADSP BF59x Processor None...
Страница 346: ...Unique Information for the ADSP BF59x Processor 9 10 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 398: ...Unique Information for the ADSP BF59x Processor 11 42 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 622: ...Unique Information for the ADSP BF59x Processor 15 38 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 700: ...Programming Examples 16 78 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 738: ...Boundary Scan Architecture B 8 ADSP BF59x Blackfin Processor Hardware Reference...