ADSP-2126x SHARC Processor Hardware Reference
10-49
Serial Peripheral Interface Port
3. Write the first three parameters for the initial DMA to the
IISPI
,
IMSPI
,
CSPI
,
IISPIB
,
IMSPIB
, and
CSPIB
registers directly.
4. Select a baud rate using the
SPIBAUD
register.
5. Select which flag to use as the SPI slave select signal in the
SPIFLG
register.
6. Configure and enable the SPI port with the
SPICTL
, SPICTLB
registers.
7. Configure the DMA settings for the entire sequence, enabling
DMA and DMA chaining in the
SPIDMAC
register.
Begin the DMA by writing the address of a TCB (describing the second
DMA in the chain) to the
CPSPI
,
CPSPI
registers.
Stopping Core Transfers
When performing transmit operations with the SPI port, disabling the SPI
port prematurely can cause data corruption and/or not fully transmitted
data. Before the program disables the SPI port in order to reconfigure it,
the status bits should be polled to ensure that all valid data has been com-
pletely transferred. For core-driven transfers, data moves from the
TXSPI
buffer into a shift register. The following bits should be checked before
disabling the SPI port:
1. Wait for the
TXSPIx
buffers to empty into the shift register. This is
done when the
TXS
bit (bit 3) of the
SPISTATx
registers becomes
zero.
2. Wait for the SPI shift registers to finish shifting out data. This is
done when the
SPIF
bit (bit 0 of
SPISTATx
registers) becomes one.
3. Disable the SPI ports by setting the
SPIEN
bit (bit 0) in the
SPICTLx
registers to zero.
Summary of Contents for ADSP-21261 SHARC
Page 30: ...Contents xxx ADSP 2126x SHARC Processor Hardware Reference ...
Page 40: ...Register Diagram Conventions xl ADSP 2126x SHARC Processor Hardware Reference ...
Page 58: ...Differences From Previous SHARCs 1 18 ADSP 2126x SHARC Processor Hardware Reference ...
Page 112: ...Secondary Processing Element PEy 2 54 ADSP 2126x SHARC Processor Hardware Reference ...
Page 178: ...Summary 3 66 ADSP 2126x SHARC Processor Hardware Reference ...
Page 204: ...DAG Instruction Summary 4 26 ADSP 2126x SHARC Processor Hardware Reference ...
Page 322: ...Setting Up DMA 7 32 ADSP 2126x SHARC Processor Hardware Reference ...
Page 436: ...SPORT Programming Examples 9 86 ADSP 2126x SHARC Processor Hardware Reference ...
Page 521: ...ADSP 2126x SHARC Processor Hardware Reference 11 31 Input Data Port rts IDP_ISR end ...
Page 522: ...Input Data Port Programming Example 11 32 ADSP 2126x SHARC Processor Hardware Reference ...
Page 590: ...Timer Programming Examples 14 20 ADSP 2126x SHARC Processor Hardware Reference ...
Page 796: ...I O Processor Registers A 174 ADSP 2126x SHARC Processor Hardware Reference ...
Page 800: ...B 4 ADSP 2126x SHARC Processor Core Manual ...
Page 846: ...Index I 36 ADSP 2126x SHARC Processor Hardware Reference ...