Serial Peripheral Interface Module (SPI)
Queuing Transmission Data
MC68HC908MR16/MC68HC908MR32
—
Rev. 5.0
Advance Information
MOTOROLA
Serial Peripheral Interface Module (SPI)
267
Figure 13-11. SPRF/SPTE CPU Interrupt Timing
For a slave, 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 into the shift register. This allows the user to
queue up a 16-bit value to send. For an already active slave, the load of
the shift register cannot occur until the transmission is completed. This
implies that a back-to-back write to the transmit data register is not
possible. The SPTE indicates when the next write can occur.
BIT
3
MOSI
SPSCK
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 FROMTRANSMIT DATA
REGISTER TO SHIFT REGISTER, SETTING SPTE BIT.
3
1
2
2
3
5
SPRF
READ SPSCR
MSBBIT
6
BIT
5
BIT
4
BIT
2
BIT
1
LSBMSBBIT
6
BIT
5
BIT
4
BIT
3
BIT
2
BIT
1
LSBMSBBIT
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 FROMTRANSMIT DATA
REGISTER TO SHIFT REGISTER, SETTING SPTE BIT.
11 CPU READS SPSCR WITH SPRF BIT SET.
5
8
10
8
10
4
FIRST INCOMING BYTE TRANSFERS FROMSHIFT
REGISTER TO RECEIVE DATA REGISTER, SETTING
SPRF BIT.
6 CPU READS SPSCR WITH SPRF BIT SET.
4
6
9
SECOND INCOMING BYTE TRANSFERS FROMSHIFT
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.
CPHA:CPOL = 1:0