SPI Data Transfer Operations
10-14
ADSP-2126x SHARC Processor Hardware Reference
Master Mode DMA Operation
To configure the SPI port for Master mode DMA transfers:
1. Specify which
FLG
pin(s) to use as the slave-select signal(s) by set-
ting one or more of the SPI Flag (
SPIFLG
register) Select bits (
DSxEN
bits 3–0).
2. Enable the device as a master and configure the SPI system by
selecting the appropriate word length, transfer format, baud rate,
and so on in the
SPIBAUD
and
SPICTL
registers. The
TIMOD
field (bits
1–0) in the
SPICTL
register is configured to select transmit or
receive with DMA mode (
TIMOD
= 10).
3. Activate the desired slaves by clearing one or more of the SPI flag
bits (
SPIFLGx
) of
SPIFLG
if
CPHASE
= 1.
4. For a single DMA, define the parameters of the DMA transfer by
writing to the
IISPI
,
IMSPI
, and
CSPI
registers. For DMA chaining,
write the chain pointer address to the
CPSPI
register. The
CPSPI
register is a 20-bit read-write register that can contain address
information.
5. Write to the SPI DMA configuration register, (
SPIDMAC
), 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
SPIDMAC
register.
To avoid data corruption, enable the SPI port before enabling
DMA.
If flags are used as slave selects, programs should activate the flags by clear-
ing the flag after
SPICTL
and
SPIBAUD
are configured, but before enabling
the DMA. When
CPHASE
= 0, and a program is using DMA, the program
must use automatic flags using
SPIFLGx
.
Содержание ADSP-21261 SHARC
Страница 30: ...Contents xxx ADSP 2126x SHARC Processor Hardware Reference ...
Страница 40: ...Register Diagram Conventions xl ADSP 2126x SHARC Processor Hardware Reference ...
Страница 58: ...Differences From Previous SHARCs 1 18 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 112: ...Secondary Processing Element PEy 2 54 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 178: ...Summary 3 66 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 204: ...DAG Instruction Summary 4 26 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 322: ...Setting Up DMA 7 32 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 436: ...SPORT Programming Examples 9 86 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 521: ...ADSP 2126x SHARC Processor Hardware Reference 11 31 Input Data Port rts IDP_ISR end ...
Страница 522: ...Input Data Port Programming Example 11 32 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 590: ...Timer Programming Examples 14 20 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 796: ...I O Processor Registers A 174 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 800: ...B 4 ADSP 2126x SHARC Processor Core Manual ...
Страница 846: ...Index I 36 ADSP 2126x SHARC Processor Hardware Reference ...