28.10.2014 Views

MMC2107 - Freescale Semiconductor

MMC2107 - Freescale Semiconductor

MMC2107 - Freescale Semiconductor

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Freescale</strong> <strong>Semiconductor</strong>, Inc.<br />

Serial Peripheral Interface Module (SPI)<br />

Functional Description<br />

17.8.7 Error Conditions<br />

The SPI has two error conditions:<br />

• Write collision error<br />

• Mode fault error<br />

17.8.7.1 Write Collision Error<br />

nc...<br />

<strong>Freescale</strong> <strong>Semiconductor</strong>, I<br />

17.8.7.2 Mode Fault Error<br />

The WCOL flag in SPISR indicates that a serial transfer was in progress<br />

when the MCU tried to write new data to SPIDR. Valid write times are<br />

listed below (see Figure 17-11 and Figure 17-12 for definitions of t T<br />

and t I ):<br />

• In master mode, a valid write is within t I (when SS is high).<br />

• In slave phase 0, a valid write within t I (when SS is high).<br />

• In slave phase 1, a valid write is within t T or t I (after the last SCK<br />

edge and before SS goes low), excluding the first two SPI clocks<br />

after the last SCK edge (the beginning of t T is an illegal write).<br />

A write during any other time causes a WCOL error. The write is disabled<br />

to avoid writing over the data being transmitted. WCOL does not<br />

generate an interrupt request because the WCOL flag can be read upon<br />

completion of the transmission that was in progress at the time of the<br />

error.<br />

If the SS input of a master SPI goes low, it indicates a system error in<br />

which more than one master may be trying to drive the MOSI and SCK<br />

lines simultaneously. This condition is not permitted in normal operation;<br />

it sets the MODF flag in SPISR. If the SPIE bit in SPICR1 is also set,<br />

MODF generates an interrupt request.<br />

Configuring the SS pin as a general-purpose output or a slave-select<br />

output disables the mode fault function.<br />

A mode fault clears the SPE and MSTR bits and the DDRSP bits of the<br />

SCK, MISO, and MOSI (or MOMI) pins. This forces those pins to be<br />

high-impedance inputs to avoid any conflict with another output driver.<br />

<strong>MMC2107</strong> – Rev. 2.0<br />

Technical Data<br />

MOTOROLA Serial Peripheral Interface Module (SPI) 395<br />

For More Information On This Product,<br />

Go to: www.freescale.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!