ADSP-BF50x Blackfin Processor Hardware Reference
7-95
Direct Memory Access
Listing 7-3. Polling DMA Status
memdma_wait:
[--sp] = r7;
memdma_wait.test:
r7 = w[p0 + MDMA_D0_IRQ_STATUS - MDMA_S0_CONFIG] (z);
CC = bittst (r7, bitpos(DMA_DONE));
if !CC jump memdma_wait.test;
r7 = DMA_DONE (z);
w[p0 + MDMA_D0_IRQ_STATUS - MDMA_S0_CONFIG] = r7;
r7 = [sp++];
rts;
memdma_wait.end:
Initializing Descriptors in Memory
Descriptor-based DMAs expect the descriptor data to be available in
memory by the time the DMA is enabled. Often, the descriptors are pro-
grammed by software at run-time. Many times, however, the
descriptors—or at least large portions of them—can be static and there-
fore initialized at boot time. How to set up descriptors in global memory
depends heavily on the programming language and the tool set used. The
following examples show how this is best performed in assembly language.
Listing 7-4
uses multiple variables of either 16-bit or 32-bit size to
describe DMA descriptors. This example has two descriptors in small list
flow mode that point to each other. At the end of the second work unit,
an interrupt is generated without discontinuing the DMA processing. The
trailing
.end
label is required to let the linker know that a descriptor forms
a logical unit. It prevents the linker from removing variables when
optimizing.
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 ...