12.3.8 SPI 3-Wire Mode Description
SPI 3-wire mode allows for SPI communication over three pins instead of the normal four pins.
In master mode, if the TRIWIRE 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.
indicates the pin function differences between 3-wire and 4-wire SPI mode for a master and slave
SPI.
Table 12-4. 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 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.
illustrate 3-wire master and slave mode.
SPIDAT
Data RX
Data TX
SPI Module
GPIO MUX
Talk
SPICTL.1
Free pin
SPIMOMIx
Figure 12-8. SPI 3-wire Master Mode
Serial Peripheral Interface (SPI)
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
TMS320x2806x Microcontrollers
773
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......