![Analog Devices Blackfin ADSP-BF537 Скачать руководство пользователя страница 654](http://html.mh-extra.com/html/analog-devices/blackfin-adsp-bf537/blackfin-adsp-bf537_hardware-reference-manual_2939700654.webp)
Programming Examples
10-48
ADSP-BF537 Blackfin Processor Hardware Reference
R0 = W[P1++](z); /* Get next data to be transmitted */
W[P0] = R0.l; /* Write that data to SPI_TDBR */
Kick_Off_Next:
P0.H = hi(SPI_RDBR); /* SPI receive register */
P0.L = lo(SPI_RDBR);
R0 = W[P0] (z); /* Read SPI receive register (also kicks off
next transfer) */
W[P2++] = R0; /* Store received data to memory */
RTI; /* Exit interrupt handler */
Stopping
In order for a data transfer to end after the user has transferred all data,
the following code can be used to stop the SPI. Note that this is typically
done in the interrupt handler to ensure the final data has been sent in its
entirety.
Listing 10-4. Stopping SPI
Stopping_SPI:
P0.H = hi(SPI_CTL);
P0.L = lo(SPI_CTL);
R0 = W[P0];
BITCLR(R0, 14); /* Clear SPI enable bit */
W[P0] = R0.L; ssync; /* Disable SPI */
DMA Transfer
The following DMA-driven master-mode SPI autobuffer example shows
how to initialize DMA, initialize SPI, signal the start of a transfer, and
generate a stop condition.
Содержание 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 ...