16-Bit Word Lengths; Packing - Analog Devices SHARC ADSP-21368 Hardware Reference Manual

Hide thumbs Also See for SHARC ADSP-21368:
Table of Contents

Advertisement

SPI Word Lengths

16-Bit Word Lengths

Programs can use 16-bit word lengths when transmitting or receiving.
When transmitting, the SPI port sends out only the lower 16 bits of the
word written to the SPI buffer.
For example, if the processor executes the following instructions:
r0 = 0x12345678
dm(TXSPI) = r0;
the SPI port transmits
When receiving, the SPI port packs the 16-bit word to the lower 32 bits of
the
buffer while the upper bits in the register are zeros.
RXSPI
For example, if an SPI host sends the processor the 32-bit word
, the processor receives the following words:
0x12345678
0x00005678
//first word
0x00001234
//second word
32-Bit Word Lengths
Programs can use 32-bit word lengths when transmitting or receiving. No
packing of the
ister is used for the data word.

Packing

In order to communicate with 8-bit SPI devices and store 8-bit words in
internal memory, a packed transfer feature is built into the SPI port. Pack-
ing is enabled through the
unpacks data when it transmits and packs data when it receives. When
packing is enabled, two 8-bit words are packed into one 32-bit word.
6-32
.
0x5678
or
registers is necessary as the entire 32-bit reg-
RXSPI
TXSPI
PACKEN
ADSP-21368 SHARC Processor Hardware Reference
bit in the
register. The SPI port
SPICTL

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SHARC ADSP-21368 and is the answer not in the manual?

Table of Contents