SPI Registers and Waveforms
969
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
C28 Serial Peripheral Interface (SPI)
Figure 12-19. SPI Serial Transmit Buffer Register (SPITXBUF) — Address 7048h
15
14
13
12
11
10
9
8
TXB15
TXB14
TXB13
TXB12
TXB11
TXB10
TXB9
TXB8
R-0
R-0
R-0
R-0
R-0
R-0
R-0
R-0
7
6
5
4
3
2
1
0
TXB7
TXB6
TXB5
TXB4
TXB3
TXB2
TXB1
TXB0
R-0
R-0
R-0
R-0
R-0
R-0
R-0
R-0
LEGEND: R/W = Read/Write; R = Read only; -
n
= value after reset
Table 12-15. SPI Serial Transmit Buffer Register (SPITXBUF) Field Descriptions
Bit
Field
Value
Description
15-0
TXB15
−
TXB0
Transmit Data Buffer. This is where the next character to be transmitted is stored. When the
transmission of the current character has completed, if the TX BUF FULL Flag bit is set, the
contents of this register is automatically transferred to SPIDAT, and the TX BUF FULL Flag is
cleared.
Writes to SPITXBUF must be left-justified.
12.3.1.8 SPI Serial Data Register (SPIDAT)
SPIDAT is the transmit/receive shift register. Data written to SPIDAT is shifted out (MSB) on subsequent
SPICLK cycles. For every bit (MSB) shifted out of the SPI, a bit is shifted into the LSB end of the shift
register.
Figure 12-20. SPI Serial Data Register (SPIDAT) — Address 7049h
15
14
13
12
11
10
9
8
SDAT15
SDAT14
SDAT13
SDAT12
SDAT11
SDAT10
SDAT9
SDAT8
R-0
R-0
R-0
R-0
R-0
R-0
R-0
R-0
7
6
5
4
3
2
1
0
SDAT7
SDAT6
SDAT5
SDAT4
SDAT3
SDAT2
SDAT1
SDAT0
R-0
R-0
R-0
R-0
R-0
R-0
R-0
R-0
LEGEND: R/W = Read/Write; R = Read only; -
n
= value after reset
Table 12-16. SPI Serial Data Register (SPIDAT) Field Descriptions
Bit
Field
Value
Description
15-0
SDAT15
−
SDAT0
Serial data. Writing to the SPIDAT performs two functions:
• It provides data to be output on the serial output pin if the TALK bit (SPICTL.1) is set.
• When the SPI is operating as a master, a data transfer is initiated. When initiating a transfer, see
the CLOCK POLARITY bit (SPICCR.6) described in
and the CLOCK PHASE bit
(SPICTL.3) described in
, for the requirements.
In master mode, writing dummy data to SPIDAT initiates a receiver sequence. Since the data is not
hardware-justified for characters shorter than sixteen bits, transmit data must be written in left-
justified form, and received data read in right-justified form.