SPI Data Transfer Operations
10-20
ADSP-2126x SHARC Processor Hardware Reference
Changing SPI Configuration
Programs should take the following precautions when changing SPI
configurations.
• The SPI configuration must not be changed during a data transfer.
• Change the clock polarity only when no slaves are selected.
• Change the SPI configuration when
SPIEN
= 0. For example, if
operating as a master in a multislave system, and there are slaves
that require different data or clock formats, then the master SPI
should be disabled, reconfigured, and then re-enabled.
However, when an SPI communication link consists of the follow-
ing: 1) a single master and a single slave, 2)
CPHASE
= 1, and 3) the
slave’s slave select input is tied low, the program can change the
SPI configuration. In this case, the slave is always selected. Data
corruption can be avoided by enabling the slave only after config-
uring both the master and slave devices.
When performing transmit operations with the SPI port, disabling the SPI
port prematurely can cause data to be corrupted and or not fully transmit-
ted. 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
TXSPI
buffer to empty into the shift register. This is
done when the
TXS
bit, (bit 3) of the
SPISTAT
register becomes zero.
2. Wait for the SPI Shift register to finish shifting out data This is
done when the
SPIF
bit, (bit 0) of the
SPISTAT
register becomes
one.
Содержание 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 ...