Programming Model
10-46
ADSP-2126x SHARC Processor Hardware Reference
3. Activate the desired slaves by clearing one or more of the SPI flag
bits (
SPIFLGx
) of the
SPIFLGx
registers, if
CPHASE
= 1.
4. For a single DMA, define the parameters of the DMA transfer by
writing to the
IISPIx
,
IMSPIx
, and
CSPIx
registers. For DMA
chaining, write the chain pointer address to the
CPSPIx
registers.
Write to the SPI DMA configuration registers, (
SPIDMACx
), to specify the
DMA direction (
SPIRCV
, bit 1) and to enable the SPI DMA engine
(
SPIDEN
, bit 0). If DMA chaining is desired, set (= 1) the
SPICHEN
bit (bit
4) in the
SPIDMACx
registers.
If DPI pins are used as slave selects, programs should route them appro-
priately after the
SPICTLx
and
SPIBAUDx
registers are configured, but
before enabling the DMA. When
CPHASE
= 0, or
CPHASE
= 1, the DPI pins
are automatically activated by the SPI ports.
When enabled as a master, the DMA engine transmits or receives data as
follows.
1. If the SPI system is configured for transmitting, the DMA engine
reads data from memory into the SPI DMA FIFO. Data from the
DMA FIFO is loaded into the
TXSPIx
registers and then into the
transmit shift register. This initiates the transfer on the SPI port.
2. If configured to receive, data from the
RXSPIx
registers is automati-
cally loaded into the SPI DMA FIFO. Then the DMA engine reads
data from the SPI DMA FIFO and writes to memory. Finally, the
SPI initiates the receive transfer.
3. The SPI generates the programmed signal pulses on
SPICLK
and the
data is shifted out of
MOSI
and in from
MISO
simultaneously.
4. The SPI continues sending or receiving words until the SPI DMA
word count register transitions from 1 to 0.
If the DMA engine is unable to keep up with the transmit stream during a
transmit operation because the IOP requires the IOD (I/O data) bus to
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 ...