Serial Peripheral Interface (SPI)
Queuing Transmission Data
MC68HC08AS32A — Rev. 1
Data Sheet
MOTOROLA
Serial Peripheral Interface (SPI)
For More Information On This Product,
Go to: www.freescale.com
229
Figure 15-11. SPI Interrupt Request Generation
Figure 15-12. SPRF/SPTE CPU Interrupt Timing
The transmit data buffer allows back-to-back transmissions without the slave
precisely timing its writes between transmissions as in a system with a single data
buffer. Also, if no new data is written to the data buffer, the last value contained in
the shift register is the next data word to be transmitted.
For an idle master or idle slave that has no data loaded into its transmit buffer, the
SPTE is set again no more than two bus cycles after the transmit buffer empties
SPTE
SPTIE
SPRF
SPRIE
ERRIE
MODF
OVRF
SPE
SPI TRANSMITTER
CPU INTERRUPT REQUEST
SPI RECEIVER/ERROR
CPU INTERRUPT REQUEST
BIT
3
MOSI
SPSCK (CPHA:CPOL = 1:0)
SPTE
WRITE TO SPDR
1
CPU WRITES BYTE 2 TO SPDR, QUEUEING
BYTE 2 AND CLEARING SPTE BIT.
CPU WRITES BYTE 1 TO SPDR, CLEARING
SPTE BIT.
BYTE 1 TRANSFERS FROM TRANSMIT DATA
REGISTER TO SHIFT REGISTER,
SETTING SPTE BIT.
3
1
2
2
3
5
SPRF
READ SPSCR
MSB BIT
6
BIT
5
BIT
4
BIT
2
BIT
1
LSBMSB BIT
6
BIT
5
BIT
4
BIT
3
BIT
2
BIT
1
LSBMSB BIT
6
BYTE 2 TRANSFERS FROM TRANSMIT DATA
REGISTER TO SHIFT REGISTER, SETTING
SPTE BIT.
CPU WRITES BYTE 3 TO SPDR, QUEUEING
BYTE 3 AND CLEARING SPTE BIT.
BYTE 3 TRANSFERS FROM TRANSMIT
DATA REGISTER TO SHIFT REGISTER,
SETTING SPTE BIT.
5
8
10
8
10
4
FIRST INCOMING BYTE TRANSFERS FROM SHIFT
SHIFT REGISTER TO RECEIVE DATA REGISTER,
SETTING SPRF BIT.
6
CPU READS SPSCR WITH SPRF BIT SET.
4
6
9
SECOND INCOMING BYTE TRANSFERS FROM
SHIFT REGISTER TO RECEIVE DATA REGISTER,
SETTING SPRF BIT.
9
11
12 CPU READS SPDR, CLEARING SPRF BIT.
BIT
5
BIT
4
BYTE 1
BYTE 2
BYTE 3
7
12
READ SPDR
7
CPU READS SPDR, CLEARING SPRF BIT.
11 CPU READS SPSCR WITH SPRF BIT SET.
F
Freescale Semiconductor, Inc.
n
.