
I/O Registers
MC68HC08LK60 MC68HC908LK60 Advance Information Data Sheet, Rev. 1.1
Freescale Semiconductor
165
OVRF — Overflow bit
This clearable, read-only flag is set if software does not read the byte in the receive data register before
the next full byte enters the shift register. In an overflow condition, the byte already in the receive data
register is unaffected, and the byte that shifted in last is lost. Clear the OVRF bit by reading the SPI
status and control register with OVRF set and then reading the receive data register.
1 = Overflow
0 = No overflow
MODF — Mode fault bit
This clearable, read-only flag is set in a slave SPI if the SS pin goes high during a transmission with
the MODFEN bit set. In a master SPI, the MODF flag is set if the SS pin goes low at any time with the
MODFEN bit set. Clear the MODF bit by reading the SPI status and control register (SPSCR) with
MODF set and then writing to the SPI control register (SPCR).
1 = SS pin at inappropriate logic level
0 = SS pin at appropriate logic level
SPTE — SPI transmitter empty bit
This clearable, read-only flag is set each time the transmit data register transfers a byte into the shift
register. SPTE generates an interrupt request if the SPTIE bit in the SPI control register is set also.
1 = Transmit data register empty
0 = Transmit data register not empty
NOTE
Do not write to the SPI data register unless the SPTE bit is high.
MODFEN — Mode fault enable bit
This read/write bit, when set to 1, allows the MODF flag to be set. If the MODF flag is set, clearing the
MODFEN does not clear the MODF flag.
If the MODFEN bit is low, the level of the SS pin does not affect the operation of an enabled SPI
configured as a master. For an enabled SPI configured as a slave, having MODFEN low only prevents
the MODF flag from being set. It does not affect any other part of SPI operation.
(See 13.7.2 ModeSPR1 and SPR0 — SPI baud rate select bits
In master mode, these read/write bits select one of four baud rates as shown in
Table 13-3. SPR1 and
SPR0 have no effect in slave mode. Reset clears SPR1 and SPR0.
Use this formula to calculate the SPI baud rate:
CGMOUT = base clock output of the clock generator module (CGM)
BD = baud rate divisor
Table 13-3. SPI Master Baud Rate Selection
SPR1 and SPR0
Baud rate divisor (BD)
00
2
01
8
10
32
11
128
Baud rate
CGMOUT
2BD
×
--------------------------
=