t
C2TDELAY
SPIx_SCS[n]
SPIx_CLK
SPIx_SOMI
SPI module clock
Registers
1461
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial Peripheral Interface (SPI)
Table 29-24. SPI Delay Register (SPIDELAY) Field Descriptions (continued)
Bit
Field
Value
Description
15-8
T2EDELAY
0-FFh
Transmit-data-finished-to-SPIx_ENA-pin-inactive-time-out. T2EDELAY is used in master mode only. It
defines a time-out value as a multiple of SPI clock before the SPIx_ENA signal has to become inactive
and after the CS becomes inactive. The SPI clock depends on which data format is selected. If the
slave device is missing one or more clock edges, it is becoming desynchronized. Although the master
has finished the data transfer the slave is still waiting for the missed clock pulses and the SPIx_ENA
signal is not disabled. The T2EDELAY defines a time-out value that triggers the DESYNC flag, if the
SPIx_ENA signal is not deactivated in time. The DESYNC flag is set to indicate that the slave device
did not deassert its SPIx_ENA pin in time to acknowledge that it has received all the bits of the sent
character. The DESYNC flag is also set if the SPI detects a deassertion of the SPIx_ENA pin even
before the end of the transmission. See
.
The time-out value is calculated as follows:
t
T2EDELAY
= T2EDELAY/SPIclock
Example: SPIclock = 8 Mbit/s; T2EDELAY = 10h;
> t
T2EDELAY
= 2
μ
s;
The slave device has to disable the SPIx_ENA signal within 2
μ
s; otherwise, the DESYNC flag in
SPIFLG is set and an interrupt is asserted if enabled.
7-0
C2EDELAY
0-FFh
Chip-select-active-to-SPIx_ENA-signal-active-time-out. C2EDELAY is used only in master mode and it
applies only if the addressed slave generates an SPIx_ENA signal as a hardware handshake response.
C2EDELAY defines the maximum time between the SPI activates the chip select signal and the
addressed slave has to respond by activating the SPIx_ENA signal. C2EDELAY defines a time-out
value as a multiple of SPI clocks. See
.
Note:
If the slave device is not responding with the SPIx_ENA signal before the time-out value is
reached, the TIMEOUT flag in SPIFLG is set and an interrupt is asserted if enabled.
The timeout value is calculated as follows:
t
C2EDELAY
= C2EDELAY/SPIclock
Example: SPIclock = 8 Mbit/s; C2EDELAY = 30h;
> t
C2EDELAY
= 6
μ
s;
The slave device has to activate the SPIx_ENA signal within 6
μ
s after the SPI has activated the chip
select signal (SPIx_SCS[n]); otherwise, the TIMEOUT flag in SPIFLG is set and an interrupt is asserted
if enabled.
Figure 29-34. Example: t
C2TDELAY
= 8 SPI Module Clock Cycles