SCI Low-Power Mode
1732
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
Serial Communication Interface (SCI) Module
30.6.1 Sleep Mode for Multiprocessor Communication
When the SCI receives data and transfers that data from SCIRXSHF to SCIRD, the RXRDY bit is set and
if RX INT ENA is set, the SCI also generates an interrupt. The interrupt triggers the CPU to read the newly
received frame before another one is received. In multiprocessor communication modes, this default
behavior may be enhanced to provide selective indication of new data. When SCI receives an address
frame that does not match its address, the device can ignore the data following this non-matching address
until the next address frame by using sleep mode. Sleep mode can be used with both idle-line and
address-bit multiprocessor modes.
If sleep mode is enabled by the SLEEP bit, then the SCI transfers data from SCIRXSHF to SCIRD only for
address frames. Therefore, in sleep mode, all data frames are assembled in the SCIRXSHF register
without being shifted into the SCIRD and without initiating a receive interrupt or DMA request. Upon
reception of an address frame, the contents of the SCIRXSHF are moved into SCIRD, and the software
must read SCIRD and determine if the SCI is being addressed by comparing the received address against
the address previously set in the software and stored somewhere in memory (the SCI does not have
hardware available for address comparison). If the SCI is being addressed, the software must clear the
SLEEP bit so that the SCI will load SCIRD with the data of the data frames that follow the address frame.
When the SCI has been addressed and sleep mode has been disabled (in software) to allow the receipt of
data, the SCI should check the RXWAKE bit (SCIFLR.12) to determine when the next address has been
received. This bit is set to 1 if the current value in SCIRD is an address and set to 0 if SCIRD contains
data. If the RXWAKE bit is set, then software should check the address in SCIRD against its own address.
If it is still being addressed, then sleep mode should remain disabled. Otherwise, the SLEEP bit should be
set again.
Following is a sequence of events typical of sleep mode operation:
•
The SCI is configured and both sleep mode and receive actions are enabled.
•
An address frame is received and a receive interrupt is generated.
•
Software compares the received address frame against that set by software and determines that the
SCI is not being addressed, so the value of the SLEEP bit is not changed.
•
Several data frames are shifted into SCIRXSHF, but no data is moved to SCIRD and no receive
interrupts are generated.
•
A new address frame is received and a receive interrupt is generated.
•
Software compares the received address frame against that set by software and determines that the
SCI is being addressed and clears the SLEEP bit.
•
Data shifted into SCIRXSHF is transferred to SCIRD, and a receive interrupt is generated after each
data frame is received.
•
In each interrupt routine, software checks RXWAKE to determine if the current frame is an address
frame.
•
Another address frame is received, RXWAKE is set, software determines that the SCI is not being
addressed and sets the SLEEP bit back to 1. No receive interrupts are generated for the data frames
following this address frame.
By ignoring data frames that are not intended for the device, fewer interrupts are generated. These
interrupts would otherwise require CPU intervention to read data that is of no significance to this specific
device. Using sleep mode can help free some CPU resources.
Except for the RXRDY flag, the SCI continues to update the receiver status flags (see
) while
sleep mode is active. In this way, if an error occurs on the receive line, an application can immediately
respond to the error and take the appropriate corrective action.
Because the RXRDY bit is not updated for data frames when sleep mode is enabled, the SCI can enable
sleep mode and use a polling algorithm if desired. In this case, when RXRDY is set, software knows that a
new address has been received. If the SCI is not being addressed, then the software should not change
the value of the SLEEP bit and should continue to poll RXRDY.