English
Language : 

M68HC11 Datasheet, PDF (171/336 Pages) Motorola, Inc – Technical Data
Serial Peripheral Interface (SPI)
SPI System Errors
direction register. This sets the SS pin to act as a general-purpose output
rather than the dedicated input to the slave select circuit, thus inhibiting
the mode fault flag. The other three lines are dedicated to the SPI
whenever the serial peripheral interface is on.
The state of the master and slave CPHA bits affects the operation of SS.
CPHA settings should be identical for master and slave. When
CPHA = 0, the shift clock is the OR of SS with SCK. In this clock phase
mode, SS must go high between successive characters in an SPI
message. When CPHA = 1, SS can be left low between successive SPI
characters. In cases where there is only one SPI slave MCU, its SS line
can be tied to VSS as long as only CPHA = 1 clock mode is used.
8.7 SPI System Errors
Two system errors can be detected by the SPI system. The first type of
error arises in a multiple-master system when more than one SPI device
simultaneously tries to be a master. This error is called a mode fault. The
second type of error, write collision, indicates that an attempt was made
to write data to the SPDR while a transfer was in progress.
When the SPI system is configured as a master and the SS input line
goes to active low, a mode fault error has occurred — usually because
two devices have attempted to act as master at the same time. In cases
where more than one device is concurrently configured as a master,
there is a chance of contention between two pin drivers. For push-pull
CMOS drivers, this contention can cause permanent damage. The mode
fault mechanism attempts to protect the device by disabling the drivers.
The MSTR control bit in the SPCR and all four DDRD control bits
associated with the SPI are cleared and an interrupt is generated subject
to masking by the SPIE control bit and the I bit in the CCR.
Other precautions may need to be taken to prevent driver damage. If two
devices are made masters at the same time, mode fault does not help
protect either one unless one of them selects the other as slave. The
amount of damage possible depends on the length of time both devices
attempt to act as master.
MC68HC11E Family — Rev. 4
MOTOROLA
Serial Peripheral Interface (SPI)
Technical Data
171