Datasheet

17.4.9 Error Conditions
The SPI module has one error condition: the mode fault error.
17.4.9.1 Mode Fault Error
If the SS input becomes low while the SPI is configured as a master, it indicates a system
error where more than one master may be trying to drive the MOSI and SPSCK lines
simultaneously. This condition is not permitted in normal operation, and it sets the
MODF bit in the SPI status register automatically provided that the MODFEN bit is set.
In the special case where the SPI is in master mode and the MODFEN bit is cleared, the
SS pin is not used by the SPI. In this special case, the mode fault error function is
inhibited and MODF remains cleared. If the SPI system is configured as a slave, the SS
pin is a dedicated input pin. A mode fault error does not occur in slave mode.
If a mode fault error occurs, the SPI is switched to slave mode, with the exception that
the slave output buffer is disabled. So the SPSCK, MISO and MOSI pins are forced to be
high impedance inputs to avoid any possibility of conflict with another output driver. A
transmission in progress is aborted and the SPI is forced into idle state.
If the mode fault error occurs in the bidirectional mode for an SPI system configured in
master mode, the output enable of MOMI (MOSI in bidirectional mode) is cleared if it
was set. No mode fault error occurs in the bidirectional mode for the SPI system
configured in slave mode.
The mode fault flag is cleared automatically by a read of the SPI Status Register (with
MODF set) followed by a write to SPI Control Register 1. If the mode fault flag is
cleared, the SPI becomes a normal master or slave again.
17.4.10 Low Power Mode Options
This section describes the low power mode options.
17.4.10.1 SPI in Run Mode
In run mode, with the SPI system enable (SPE) bit in the SPI control register clear, the
SPI system is in a low-power, disabled state. SPI registers can still be accessed, but
clocks to the core of this module are disabled.
Chapter 17 16-Bit Serial Peripheral Interface (16-Bit SPI)
MC9S08PA60 Reference Manual, Rev. 1, 9/2012
Freescale Semiconductor, Inc. 483