Architecture
1419
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial Peripheral Interface (SPI)
If the chip select hold option is enabled, the chip select will not toggle between two consecutive accesses;
therefore, the SPIDELAY.T2CDELAY of the first transfer and the SPIDELAY.C2TDELAY of the second
transfer will not be applied. However, the wait delay could still be applied between the two transactions, if
the WDEL bit in SPIDAT1 is set to 1.
The current and previous values of the CSHOLD bit are retained. Though the current value of the
CSHOLD bit is initialized to 0 when the RESET bit in the SPI global control register 0 (SPIGCR0) is
cleared to 0, the previous value of the CSHOLD bit is not initialized. The previous value of the CSHOLD
bit must be explicitly initialized by writing twice to the CSHOLD bit.
29.2.6 Slave Mode Settings
The four slave mode options are defined by the configuration bit settings listed in
. Other
configuration bits may take any value in the range listed in
. The values listed in
and
should not be changed while the ENABLE bit in the SPI global control register 1 (SPIGCR1) is
set to 1. Note that in certain cases the allowed values may still be ignored. For complete details on each
mode, see the following sections that explain the SPI operation for each of the slave modes.
Table 29-5. SPI Register Settings Defining Slave Modes
Register
Bit(s)
Slave 3-pin
Slave 4-pin Chip Select
Slave 4-pin Enable
Slave 5-pin
SPIGCR0
RESET
1
1
1
1
SPIGCR1
ENABLE
1
1
1
1
SPIGCR1
LOOPBACK
0
0
0
0
SPIGCR1
CLKMOD
0
0
0
0
SPIGCR1
MASTER
0
0
0
0
SPIPC0
SOMIFUN
1
1
1
1
SPIPC0
SIMOFUN
1
1
1
1
SPIPC0
CLKFUN
1
1
1
1
SPIPC0
ENAFUN
0
0
1
1
SPIPC0
SCS0FUN
0
1
0
1
(1)
In slave mode, only SPIFMT0 is used. When SPIDAT1 is written, the DFSEL field in SPIDAT1 is cleared to 0 to select SPIFMT0.
Table 29-6. Allowed SPI Register Settings in Slave Modes
Register
Bit(s)
Slave 3-pin
Slave 4-pin Chip Select
Slave 4-pin Enable
Slave 5-pin
SPIINT0
ENABLEHIGHZ
0,1
0,1
0,1
0,1
SPIFMT
n
(1)
WDELAY
0 to 3Fh
0 to 3Fh
0 to 3Fh
0 to 3Fh
SPIFMT
n
(1)
PARPOL
0,1
0,1
0,1
0,1
SPIFMT
n
(1)
PARENA
0,1
0,1
0,1
0,1
SPIFMT
n
(1)
WAITENA
0,1
0,1
0,1
0,1
SPIFMT
n
(1)
SHIFTDIR
0,1
0,1
0,1
0,1
SPIFMT
n
(1)
DISCSTIMERS
0,1
0,1
0,1
0,1
SPIFMT
n
(1)
POLARITY
0,1
0,1
0,1
0,1
SPIFMT
n
(1)
PHASE
0,1
0,1
0,1
0,1
SPIFMT
n
(1)
PRESCALE
2 to FFh
2 to FFh
2 to FFh
2 to FFh
SPIFMT
n
(1)
CHARLEN
2 to 10h
2 to 10h
2 to 10h
2 to 10h
SPIDELAY
C2TDELAY
0 to FFh
0 to FFh
0 to FFh
0 to FFh
SPIDELAY
T2CDELAY
0 to FFh
0 to FFh
0 to FFh
0 to FFh
SPIDELAY
T2EDELAY
0 to FFh
0 to FFh
0 to FFh
0 to FFh
SPIDELAY
C2EDELAY
0 to FFh
0 to FFh
0 to FFh
0 to FFh