Enhanced SPI Module Overview
952
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
C28 Serial Peripheral Interface (SPI)
12.1.5.1.3 OVERRUN INT ENA Bit (SPICTL.4)
Setting the overrun interrupt enable bit allows the assertion of an interrupt whenever the RECEIVER
OVERRUN Flag bit (SPISTS.7) is set by hardware. Interrupts generated by SPISTS.7 and by the SPI INT
FLAG bit (SPISTS.6) share the same interrupt vector.
0
Disable RECEIVER OVERRUN Flag bit interrupts
1
Enable RECEIVER OVERRUN Flag bit interrupts
12.1.5.1.4 RECEIVER OVERRUN FLAG Bit (SPISTS.7)
The RECEIVER OVERRUN Flag bit is set whenever a new character is received and loaded into the
SPIRXBUF before the previously received character has been read from the SPIRXBUF. The RECEIVER
OVERRUN Flag bit must be cleared by software.
12.1.5.2 Data Format
Four bits (SPICCR.3–0) specify the number of bits (1 to 16) in the data character. This information directs
the state control logic to count the number of bits received or transmitted to determine when a complete
character has been processed. The following statements apply to characters with fewer than 16 bits:
•
Data must be left-justified when written to SPIDAT and SPITXBUF.
•
Data read back from SPIRXBUF is right-justified.
•
SPIRXBUF contains the most recently received character, right-justified, plus any bits that remain from
previous transmission(s) that have been shifted to the left (shown in
Example 12-1. Transmission of Bit From SPIRXBUF
Conditions:
1. Transmission character length = 1 bit (specified in bits SPICCR.3
−
0)
2. The current value of SPIDAT = 737Bh
(1)
x = 1 if SPISOMI data is high; x = 0 if SPISOMI data is low; master mode is assumed.
SPIDAT (before transmission)
0
1
1
1
0
0
1
1
0
1
1
1
1
0
1
1
SPIDAT (after transmission)
(TXed) 0
←
1
1
1
0
0
1
1
0
1
1
1
1
0
1
1
x
(1)
←
(RXed)
SPIRXBUF (after transmission)
1
1
1
0
0
1
1
0
1
1
1
1
0
1
1
x
(1)