Programming Model
5-56
ADSP-BF537 Blackfin Processor Hardware Reference
Synchronization of Software and DMA
A critical element of software DMA management is synchronization of
DMA buffer completion with the software. This can best be done using
interrupts, polling of
DMAx_IRQ_STATUS
, or a combination of both. Polling
for address or count can only provide synchronization within loose toler-
ances comparable to pipeline lengths.
Interrupt-based synchronization methods must avoid interrupt overrun,
or the failure to invoke a DMA channel’s interrupt handler for every inter-
rupt event due to excessive latency in processing of interrupts. Generally,
the system design must either ensure that only one interrupt per channel is
scheduled (for example, at the end of a descriptor list), or that interrupts
are spaced sufficiently far apart in time that system processing budgets can
guarantee every interrupt is serviced. Note, since every interrupt channel
has its own distinct interrupt, interaction among the interrupts of differ-
ent peripherals is much simpler to manage.
Polling of the
DMAx_CURR_ADDR
,
DMAx_CURR_DESC_PTR
, or
DMAx_CURR_X_
COUNT
/
DMAx_CURR_Y_COUNT
registers is not recommended as a method of
precisely synchronizing DMA with data processing, due to DMA FIFOs
and DMA/memory pipelining. The current address, pointer, and count
registers change several cycles in advance of the completion of the corre-
sponding memory operation, as measured by the time at which the results
of the operation would first be visible to the core by memory read or write
instructions. For example, in a DMA memory write operation to external
memory, assume a DMA write by channel A is initiated that causes the
SDRAM to perform a page open operation which will take many system
clock cycles. The DMA engine may then move on to another DMA oper-
ation by channel B which does not in itself incur latency, but will be
stalled behind the slow operation by channel A. Software monitoring
channel B could not safely conclude whether the memory location pointed
to by channel B’s
DMAx_CURR_ADDR
has or has not been written, based on
examination of the
DMAx_CURR_ADDR
register contents.
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 ...