
Serial Peripheral Interface (SPI) Module
Resetting the SPI
MC68HC08GP32A MC68HC08GP16A
Data Sheet
MOTOROLA
Serial Peripheral Interface (SPI) Module
209
Figure 16-12. SPI Interrupt Request Generation
The error interrupt enable bit (ERRIE) enables both the MODF and OVRF bits to
generate a receiver/error CPU interrupt request.
The mode fault enable bit (MODFEN) can prevent the MODF flag from being set
so that only the OVRF bit is enabled by the ERRIE bit to generate receiver/error
CPU interrupt requests.
The following sources in the SPI status and control register can generate CPU
interrupt requests:
SPI receiver full bit (SPRF) — SPRF becomes set every time a byte
transfers from the shift register to the receive data register. If the SPI
receiver interrupt enable bit, SPRIE, is also set, SPRF generates an SPI
receiver/error CPU interrupt request.
SPI transmitter empty (SPTE) — SPTE becomes set every time a byte
transfers from the transmit data register to the shift register. If the SPI
transmit interrupt enable bit, SPTIE, is also set, SPTE generates an SPTE
CPU interrupt request.
16.8 Resetting the SPI
Any system reset completely resets the SPI. Partial resets occur whenever the SPI
enable bit (SPE) is 0. Whenever SPE is 0, the following occurs:
The SPTE flag is set.
Any transmission currently in progress is aborted.
The shift register is cleared.
The SPI state counter is cleared, making it ready for a new complete
transmission.
All the SPI port logic is defaulted back to being general-purpose I/O.
SPTE
SPTIE
SPRF
SPRIE
SPE
CPU INTERRUPT REQUEST
SPI TRANSMITTER
SPI RECEIVER/ERROR
ERRIE
MODF
OVRF