ADSP-BF537 Blackfin Processor Hardware Reference
10-47
SPI Compatible Port Controllers
Listing 10-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);
P0.L = lo(SPI_RDBR);
R0 = W[P0] (z); /* Dummy read of SPI_RDBR kicks off transfer
*/
Post Transfer and Next Transfer
Following the transfer of data, the SPI generates an interrupt, which is ser-
viced if the interrupt is enabled during initialization. In the interrupt
routine, software must write the next value to be transmitted prior to
reading the byte received. This is because a read of the
SPI_RDBR
initiates
the next transfer.
Listing 10-3. SPI Interrupt Handler
SPI_Interrupt_Handler:
Process_SPI_Sample:
P0.H = hi(SPI_TDBR); /* SPI transmit register */
P0.L = lo(SPI_TDBR);
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 ...