English
Language : 

MMC2107 Datasheet, PDF (395/618 Pages) –
Freescale Semiconductor, Inc.
Serial Peripheral Interface Module (SPI)
Functional Description
17.8.7 Error Conditions
The SPI has two error conditions:
• Write collision error
• Mode fault error
17.8.7.1 Write Collision Error
The WCOL flag in SPISR indicates that a serial transfer was in progress
when the MCU tried to write new data to SPIDR. Valid write times are
listed below (see Figure 17-11 and Figure 17-12 for definitions of tT
and tI):
• In master mode, a valid write is within tI (when SS is high).
• In slave phase 0, a valid write within tI (when SS is high).
• In slave phase 1, a valid write is within tT or tI (after the last SCK
edge and before SS goes low), excluding the first two SPI clocks
after the last SCK edge (the beginning of tT is an illegal write).
A write during any other time causes a WCOL error. The write is disabled
to avoid writing over the data being transmitted. WCOL does not
generate an interrupt request because the WCOL flag can be read upon
completion of the transmission that was in progress at the time of the
error.
17.8.7.2 Mode Fault Error
If the SS input of a master SPI goes low, it indicates a system error in
which more than one master may be trying to drive the MOSI and SCK
lines simultaneously. This condition is not permitted in normal operation;
it sets the MODF flag in SPISR. If the SPIE bit in SPICR1 is also set,
MODF generates an interrupt request.
Configuring the SS pin as a general-purpose output or a slave-select
output disables the mode fault function.
A mode fault clears the SPE and MSTR bits and the DDRSP bits of the
SCK, MISO, and MOSI (or MOMI) pins. This forces those pins to be
high-impedance inputs to avoid any conflict with another output driver.
MMC2107 – Rev. 2.0
MOTOROLA
Serial Peripheral Interface Module (SPI)
For More Information On This Product,
Go to: www.freescale.com
Technical Data
395