
CKPH CKPL
Cycle#
UCxCLK
UCxCLK
UCxCLK
UCxCLK
UCxSIMO/
UCxSOMI
UCxSIMO
UCxSOMI
Move to UCxTXBUF
RX Sample Points
0
1
0
0
0
1
1
1
0
X
1
X
MSB
MSB
1
2
3
4
5
6
7
8
LSB
LSB
TX Data Shifted Out
UCxSTE
UC
UC
eUSCI Operation – SPI Mode
Figure 19-4. eUSCI SPI Timing With UCMSB = 1
19.3.7 Using the SPI Mode With Low-Power Modes
The eUSCI module provides automatic clock activation for use with low-power modes. When the eUSCI
clock source is inactive because the device is in a low-power mode, the eUSCI module automatically
activates it when needed, regardless of the control-bit settings for the clock source. The clock remains
active until the eUSCI module returns to its idle condition. After the eUSCI module returns to the idle
condition, control of the clock source reverts to the settings of its control bits.
In SPI slave mode, no internal clock source is required because the clock is provided by the external
master. It is possible to operate the eUSCI in SPI slave mode while the device is in LPM4 and all clock
sources are disabled. The receive or transmit interrupt can wake up the CPU from any low-power mode.
When receiving multiple bytes as a slave in LPM4 the wakeup time of the CPU needs to be considered. If
the wake-up time of the CPU is, for example, 150 µs (see device-specific data-sheet), it needs to be
ensured that the CPU serves the TXIFG of the first received byte before the second byte is completely
received by the eUSCI_A or eUSCI_B. Otherwise an overrun error occurs.
19.3.8 SPI Interrupts
The eUSCI has only one interrupt vector that is shared for transmission and for reception. eUSCI_Ax and
eUSCI_Bx do not share the same interrupt vector.
19.3.8.1 SPI Transmit Interrupt Operation
The UCTXIFG interrupt flag is set by the transmitter to indicate that UCxTXBUF is ready to accept another
character. An interrupt request is generated if UCTXIE and GIE are also set. UCTXIFG is automatically
reset if a character is written to UCxTXBUF. UCTXIFG is set after a PUC or when UCSWRST = 1.
UCTXIE is reset after a PUC or when UCSWRST = 1.
NOTE:
Writing to UCxTXBUF in SPI mode
Data written to UCxTXBUF when UCTXIFG = 0 may result in erroneous data transmission.
512
Enhanced Universal Serial Communication Interface (eUSCI) – SPI Mode
SLAU272C – May 2011 – Revised November 2013
Copyright © 2011–2013, Texas Instruments Incorporated