Starting A Transfer - Analog Devices Blackfin ADSP-BF537 Hardware Reference Manual

Hide thumbs Also See for Blackfin ADSP-BF537:
Table of Contents

Advertisement

* SPE [14]
* [15]
***************************************************/
/* Configure SPI as MASTER */
R1 = 0x190B(z);
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);
w[p0] = R2.L;
P4.H = hi(SPI_CTL);
P4.L = lo(SPI_CTL);
R2=w[p4](z);
BITSET (R2, 14);
w[p4] = R2;
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
ADSP-BF537 Blackfin Processor Hardware Reference
=
1 : SPI module is enabled
=
0 : RESERVED
/* Leave disabled until DMA is enabled*/
/*Set DMA enable bit */
/* Enable TX DMA */
/* Set SPI enable bit */
/* Enable SPI */
SPI Compatible Port Controllers
10-51

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Blackfin ADSP-BF537 and is the answer not in the manual?

Table of Contents