Registers
1460
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial Peripheral Interface (SPI)
29.3.16 SPI Delay Register (SPIDELAY)
The SPI delay register (SPIDELAY) is shown in
and described in
.
Figure 29-33. SPI Delay Register (SPIDELAY)
31
24
23
16
C2TDELAY
T2CDELAY
R/W-0
R/W-0
15
8
7
0
T2EDELAY
C2EDELAY
R/W-0
R/W-0
LEGEND: R/W = Read/Write; -
n
= value after reset
Table 29-24. SPI Delay Register (SPIDELAY) Field Descriptions
Bit
Field
Value
Description
31-24
C2TDELAY
0-FFh
Chip-select-active-to-transmit-start-delay. C2TDELAY is used in master mode only. It defines a setup
time for the slave device that delays the data transmission from the chip select active edge by a multiple
of SPI module clock cycles. C2TDELAY can be configured between 3 and 257 SPI module clock cycles.
See
The setup time value is calculated as follows:
t
C2TDELAY
= (C2 2) × SPI module clock period
Note:
If C2TDELAY = 0, then t
C2TDELAY
= 0.
Example: SPI module clock = 25 MHz -> SPI module clock period = 40 ns; C2TDELAY = 06h;
> t
C2TDELAY
= 320 ns;
When the chip select signal becomes active, the slave has to prepare for data transfer within 320 ns.
Note:
If phase = 1, the delay between SPIx_SCS[n] falling edge to the first edge of SPIx_CLK will have
an additional 0.5 SPIx_CLK period delay. This delay is as per the SPI protocol.
23-16
T2CDELAY
0-FFh
Transmit-end-to-chip-select-inactive-delay. T2CDELAY is used in master mode only. It defines a hold
time for the slave device that delays the chip select deactivation by a multiple of SPI module clock
cycles after the last bit is transferred. T2CDELAY can be configured between 2 and 256 SPI module
clock cycles.
See
The hold time value is calculated as follows:
t
T2CDELAY
= (T2 1) × SPI module clock period
Note:
If T2CDELAY = 0, then t
T2CDELAY
= 0
Example: VBUSPCLK = 25 MHz -> VBUSPCLK period = 40 ns; T2CDELAY = 03h;
> t
T2CDELAY
= 160 ns;
After the last data bit (or parity bit) is being transferred the chip select signal is held active for 160 ns.
Note:
If phase = 0, then between the last edge of SPIx_CLK and rise-edge of SPIx_SCS[n] there will be
an additional delay of 0.5 SPIx_CLK period. This is as per the SPI protocol.
Both C2TDELAY and T2CDELAY counters will not have any dependancy on the SPIx_ENA pin value.
Even if the SPIx_ENA pin is asserted by the slave, the master will continue to delay the start of
SPIx_CLK until the C2TDELAY counter overflows.
Similarly, even if the SPIx_ENA pin is deasserted by the slave, the master will continue to hold the
SPIx_SCS[n] pins active until the T2CDELAY counter overflows. This way, it is assured that the
setup/hold times of the SPIx_SCS[n] pins are determined by the delay timers alone. To achieve better
throughput, it should be ensured that these two timers are kept at the minimum possible values.