Programming Examples
10-46
ADSP-BF537 Blackfin Processor Hardware Reference
* TIMOD [1:0] = 00 : Transfer On RDBR Read.
* SZ [2] = 0 : Send Last Word When TDBR0 Is Empty
* GM [3] = 1 : Discard Incoming Data If RDBR0 Is Full
* PSSE [4] = 0 : Disables Slave-Select As Input (Master)
* EMISO [5] = 0 : MISO Disabled For Output (Master)
* [7] and [6] = 0 : RESERVED
* SIZE [8] = 1 : 16 Bit Word Length Select
* LSBF [9] = 0 : Transmit MSB First
* CPHA [10] = 0 : SCLK Starts Toggling At START Of First Data
Bit
* CPOL [11] = 1 : Active HIGH Serial Clock
* MSTR [12] = 1 : Device Is Master
* WOM [13] = 0 : Normal MOSI/MISO Data Output (No Open Drain)
* SPE [14] = 1 : SPI Module Is Enabled
* [15] = 0 : RESERVED
*************************************************/
P0.H = hi(SPI_CTL) ;
P0.L = lo(SPI_CTL) ;
R0 = 0x5908;
W[P0] = R0.L; ssync; /* Enable SPI as MASTER */
Starting a Transfer
After the initialization procedure in the given master mode, a transfer
begins following a dummy read of
SPI_RDBR
. Typically, known data which
is desired to be transmitted to the slave is preloaded into the
SPI_TDBR
. In
the following code,
P1
is assumed to point to the start of the 16-bit trans-
mit data buffer and
P2
is assumed to point to the start of the 16-bit receive
data buffer. In addition, the user must ensure appropriate interrupts are
enabled for SPI operation.
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 ...