Architecture
1418
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial Peripheral Interface (SPI)
29.2.5.1.1 Chip Select Setup Time
The master can be configured to provide a (slow) slave device a certain chip select setup time to the first
edge on SPIx_CLK. This delay is controlled by the C2TDELAY field in the SPI delay register (SPIDELAY)
and can be configured between 3 and 257 SPI module clock cycles. The C2TDELAY is applicable only in
4-pin with chip select and 5-pin SPI master modes. The C2TDELAY begins when the SPI master asserts
SPIx_SCS[n]. The C2T delay period is specified by:
Maximum duration of C2TDELAY period = SPIDELAY.C2 2 (SPI module clock cycles)
Note that if SPIDELAY.C2TDELAY = 0, then the C2TDELAY period = 0.
The previous value of the CSHOLD bit in the SPI transmit data register (SPIDAT1) must be cleared to 0
for the C2T delay to be enabled.
NOTE:
If the SPIDAT1.CSHOLD bit is set within the control field, the current hold time and the
following setup time will not be applied in between transaction.
29.2.5.1.2 Chip Select Hold Time
The master can be configured to provide a (slow) slave device a certain chip select hold time after the last
edge on SPIx_CLK. This delay is controlled by the T2CDELAY bit in the SPI delay register (SPIDELAY)
and can be configured between 2 and 256 SPI module clock cycles. The T2CDELAY is applicable only in
4-pin with chip select and 5-pin SPI master modes. The T2CDELAY begins after the data shifting period
ends. The T2C delay period is specified by:
Maximum duration of T2CDELAY period = SPIDELAY.T2 1 (SPI module clock cycle)
Note that if SPIDELAY.T2CDELAY = 0, then the T2CDELAY period = 0. If the PHASE bit in the SPI data
format register
n
(SPIFMT
n
) is 0, then the T2CDELAY period lasts for an additional 1/2 SPIx_CLK time
over that specified by the above equation.
The current value of the CSHOLD bit in the SPI transmit data register (SPIDAT1) must be cleared to 0 for
T2C delay to be enabled.
NOTE:
If the SPIDAT1.CSHOLD bit is set within the control field, the current hold time and the
following setup time will not be applied in between transaction.
29.2.5.1.3 Automatic Delay Between Transfers
The SPI master can automatically insert a delay of between 2 and 65 SPI module clock cycles between
transmissions. This delay is controlled by the WDELAY field in the SPI data format register
n
(SPIFMT
n
)
and is enabled by setting the WDEL bit in the SPI transmit data register (SPIDAT1) to 1. The WDELAY
period begins when the T2EDELAY period terminates (if T2E delay period is enabled) or when the
T2CDELAY period terminates (if T2E delay period was disabled and T2C delay period was enabled) or
when the master deasserts SPIx_SCS[n] (if T2E and T2C delay periods are disabled). If a transfer is
initiated by writing a 32-bit value to SPIDAT1, then the new values of SPIDAT1.WDEL and
SPIFMT
n
.WDELAY are used; otherwise, the old values of SPIDAT1.WDEL and SPIFMT
n
.WDELAY are
used. The WDELAY delay period is specified by:
Maximum duration of WDELAY period = SPIFMTn. 2 (SPI module clock cycles)
29.2.5.1.4 Chip Select Hold Option
There are slave devices available that require the chip select signal to be held continuously active during
several consecutive data word transfers. Other slave devices require the chip select signal to be
deactivated between consecutive data word transfers. The SPI can support both types of slave devices.
The CSHOLD bit in the SPI transmit data register (SPIDAT1) selects between the two options.