ADSP-21368 SHARC Processor Hardware Reference 6-31
Serial Peripheral Interface Ports
SPI Word Lengths
The processor’s SPI port can transmit and receive the word widths
described in the following sections.
8-Bit Word Lengths
Programs can use 8-bit word lengths when transmitting or receiving.
When transmitting, the SPI port sends out only the lower eight 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 0x78.
When receiving, the SPI port packs the 8-bit word to the lower 32 bits of
the RXSPI buffer while the upper bits in the registers are zeros.
For example, if an SPI host sends the processor the 32-bit word
0x12345678, the processor receives the following words:
0x00000078 //first word
0x00000056 //second word
0x00000034 //third word
0x00000012 //fourth word
This code works only if the MSBF bit is zero in both the transmitter and
receiver. If
MSBF = 1 in the transmitter and receiver, the received words fol-
low the order 0x12, 0x34, 0x56, 0x78.