Architecture
1433
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial Peripheral Interface (SPI)
Maximum duration of C2EDELAY period = SPIDELAY.C2 SPIFMTn.PR 2 (SPI
module clock cycles)
The C2EDELAY period is enabled only when the SPIx_ENA is deasserted at the beginning of the C2E
delay period and SPIFMT
n
.WAITENA bit is set to 1. If SPIFMT
n
.WAITENA bit is set to 1 and C2EDELAY
is cleared to 0, then the master waits indefinitely for the slave to assert SPIx_ENA.
29.2.14.5 SPI Data Length Error
An SPI can generate an error flag by detecting any mismatch in length of received/transmitted data with
the programmed character length under certain conditions.
Master Mode:
During a data transfer, if the SPI detects a deassertion of the SPIx_ENA pin (by the slave)
while the character counter is not overflowed, then an error flag is set indicating the data length error. This
can be caused by a slave receiving extra clocks (because of noise on the SPIx_CLK line).
NOTE:
In SPI master mode, the data length error will be generated only if the SPIx_ENA pin is used
as a functional pin.
Slave Mode:
During a transfer, if the SPI detects a deassertion of the SPIx_SCS[n] pin before its
character length counter overflows, then an error flag is set indicating the data length error. If the slave
SPI misses one or more SPIx_CLK pulses from the master, this situation can occur. This error in slave
mode would mean that both the transmitted and received data were not complete.
NOTE:
In SPI slave mode, the data length error flag will be generated only if the SPIx_SCS[n] pin is
configured as a functional pin.
29.2.15 Reset Considerations
This section describes the software and hardware reset considerations.
29.2.15.1 Software Reset Considerations
The SPI module contains a software reset (RESET) bit in the SPI global control register 0 (SPIGCR0) that
is used to reset the SPI module. As a result of a reset, the SPI module register values go to their reset
state. The RESET bit must be set before any operation on the SPI is done.
29.2.15.2 Hardware Reset Considerations
In the event of a hardware reset, the SPI module register values go to their reset state and the application
software needs to reprogram the registers to the desired values.
29.2.16 Power Management
The SPI module can be put in either local or global low-power mode. Global low-power mode is asserted
by the system and is not controlled by the SPI. During global low-power mode, all clocks to the SPI are
turned off so the module is completely inactive.
The SPI local low-power mode is asserted by setting the POWERDOWN bit in the SPI global control
register 1 (SPIGCR1). Setting this bit stops the clocks to the SPI internal logic and the SPI registers.
Setting the POWERDOWN bit causes the SPI to enter local low-power mode and clearing the
POWERDOWN bit causes SPI to exit from local low-power mode. All the registers are accessible during
local power-down mode as any register access enables the clock to SPI for that particular access alone.
Since entering a low-power mode has the effect of suspending all state machine activities, care must be
taken when entering such modes to ensure that a valid state is entered when low-power mode is active.
As a result, application software must ensure that a low-power mode is not entered during a transmission
or reception of data.