ADSP-BF537 Blackfin Processor Hardware Reference
10-49
SPI Compatible Port Controllers
DMA Initialization Sequence
The following code initializes the DMA to perform a 16-bit memory read
DMA operation in autobuffer mode, and generates an interrupt request
when the buffer has been sent. This code assumes that
P1
points to the
start of the data buffer to be transmitted and that
NUM_SAMPLES
is a defined
macro indicating the number of elements being sent.
Listing 10-5. DMA Initialization
Initialize_DMA: /* DMA7 = default channel for SPI DMA */
P0.H = hi(DMA7_CONFIG);
P0.L = lo(DMA7_CONFIG);
R0 = 0x1084(z); /* Autobuffer mode, IRQ on complete, linear
16-bit, mem read */
w[P0] = R0;
P0.H = hi(DMA7_START_ADDR);
P0.L = lo(DMA7_START_ADDR);
[p0] = p1; /* Start address of TX buffer */
P0.H = hi(DMA7_X_COUNT);
P0.L = lo(DMA7_X_COUNT);
R0 = NUM_SAMPLES;
w[p0] = R0; /* Number of samples to transfer */
R0 = 2;
P0.H = hi(DMA7_X_MODIFY);
P0.L = lo(DMA7_X_MODIFY);
w[p0] = R0; /* 2 byte stride for 16-bit words */
R0 = 1; /* single dimension DMA means 1 row */
P0.H = hi(DMA7_Y_COUNT);
P0.L = lo(DMA7_Y_COUNT);
w[p0] = R0;
Содержание Blackfin ADSP-BF537
Страница 42: ...Contents xlii ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 90: ...Development Tools 1 32 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 138: ...Programming Examples 4 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 340: ...SDC Programming Examples 6 84 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 606: ...Programming Examples 9 94 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 660: ...Programming Examples 10 54 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 720: ...Electrical Specifications 11 60 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 840: ...Programming Examples 13 42 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 876: ...Programming Examples 14 36 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 938: ...Programming Examples 15 62 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 958: ...Programming Examples 17 12 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 986: ...Programming Examples 18 28 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 1162: ...G 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 1218: ...Index I 56 ADSP BF537 Blackfin Processor Hardware Reference ...