ADSP-BF537 Blackfin Processor Hardware Reference
10-51
SPI Compatible Port Controllers
* SPE [14] = 1 : SPI module is enabled
* [15] = 0 : RESERVED
***************************************************/
/* Configure SPI as MASTER */
R1 = 0x190B(z); /* Leave disabled until DMA is enabled*/
P1.L = lo(SPI_CTL);
W[P1] = R1; ssync;
Starting a Transfer
After the initialization procedure in the given master mode, a transfer
begins following enabling of SPI. However, the DMA must be enabled
before enabling the SPI.
Listing 10-7. Starting a Transfer
Initiate_Transfer:
P0.H = hi(DMA7_CONFIG);
P0.L = lo(DMA7_CONFIG);
R2 = w[P0](z);
BITSET (R2, 0);
/*Set DMA enable bit */
w[p0] = R2.L; /* Enable TX DMA */
P4.H = hi(SPI_CTL);
P4.L = lo(SPI_CTL);
R2=w[p4](z);
BITSET (R2, 14); /* Set SPI enable bit */
w[p4] = R2; /* Enable SPI */
Stopping a Transfer
In order for a data transfer to end after the DMA has transferred all
required data, the following code is executed in the SPI DMA interrupt
handler. The example code below clears the DMA interrupt, then waits
for the DMA engine to stop running. When the DMA engine has
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 ...