SPIDAT
Data RX
Data TX
SPI Module
GPIO MUX
Talk
SPICTL.1
Free pin
SPIMOMIx
Enhanced SPI Module Overview
958
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
C28 Serial Peripheral Interface (SPI)
Table 12-4. SPI Interrupt Flag Modes (continued)
SPI Interrupt
Interrupt
Interrupt
FIFO Enable
Interrupt
(1)
SPI FIFO mode
FIFO receive
RXFFIL
RXFFIENA
1
SPIRXINT
Transmit empty
TXFFIL
TXFFIENA
1
SPITXINT
12.1.7 SPI 3-Wire Mode Description
SPI 3-wire mode allows for SPI communication over 3 pins instead of the normal 4 pins.
In master mode, if the TRIWIRE (SPIPRI.0) bit is set, enabling 3-wire SPI mode, SPISIMOx becomes the
bi-directional SPIMOMIx (SPI master out, master in) pin, and SPISOMIx is no longer used by the SPI. In
slave mode, if the TRIWIRE bit is set, SPISOMIx becomes the bi-directional SPISISOx (SPI slave in, slave
out) pin, and SPISIMOx is no longer used by the SPI.
The table below indicates the pin function differences between 3-wire and 4-wire SPI mode for a master
and slave SPI.
Table 12-5. 4-wire vs. 3-wire SPI Pin Functions
4-wire SPI
3-wire SPI (Master)
3-wire SPI(Slave)
SPICLKx
SPICLKx
SPICLKx
SPISTEx
SPISTEx
SPISTEx
SPISIMOx
SPIMOMIx
Free
SPISOMIx
Free
SPISISOx
Because in 3-wire mode, the receive and transmit paths within the SPI are connected, any data
transmitted by the SPI module is also received by itself. The application software must take care to
perform a dummy read to clear the SPI data register of the additional received data.
The TALK bit (SPICTL.1) plays an important role in 3-wire SPI mode. The bit must be set to transmit data
and cleared prior to reading data. In master mode, in order to initiate a read, the application software must
write dummy data to the SPI data register (SPIDAT or SPIRXBUF) while the TALK bit is cleared (no data
is transmitted out the SPIMOMI pin) before reading from the data register.
Figure 12-8. SPI 3-wire Master Mode