
ADSP-BF59x Blackfin Processor Hardware Reference
13-45
SPI-Compatible Port Controller
* [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.
Listing 13-2. Initiate Transfer
Initiate_Transfer:
P0.H = hi(SPI_FLG);
P0.L = lo(SPI_FLG);
R0 = W[P0] (Z);
BITCLR (R0,0xF);
/* FLG7 */
W[P0] = R0;
/* Drive 0 on enabled slave-select pin */
P0.H = hi(SPI_TDBR);
/* SPI Transmit Register */
P0.L = lo(SPI_TDBR);
R0 = W[P1++] (z);
/* Get First Data To Be Transmitted And Increment Pointer */
W[P0] = R0;
/* Write to SPI_TDBR */
P0.H = hi(SPI_RDBR);
Содержание ADSP-BF59x Blackfin
Страница 64: ...Development Tools 1 22 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 74: ...Processor Specific MMRs 2 10 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 204: ...Unique Information for the ADSP BF59x Processor 5 104 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 244: ...Programming Examples 6 40 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 345: ...ADSP BF59x Blackfin Processor Hardware Reference 9 9 Core Timer Unique Information for the ADSP BF59x Processor None...
Страница 346: ...Unique Information for the ADSP BF59x Processor 9 10 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 398: ...Unique Information for the ADSP BF59x Processor 11 42 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 622: ...Unique Information for the ADSP BF59x Processor 15 38 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 700: ...Programming Examples 16 78 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 738: ...Boundary Scan Architecture B 8 ADSP BF59x Blackfin Processor Hardware Reference...