![](http://datasheet.mmic.net.cn/290000/XPC801ZP25_datasheet_16187868/XPC801ZP25_388.png)
Serial Communication Modules
MOTOROLA
MPC801 USER’S MANUAL
16-17
16
Independently Programmable Baud Rate Generator
Programmable Clock Phase and Polarity
Open-Drain Output Pins Support Multimaster Configuration
Local Loopback Capability for Testing
16.3.2.2 CLOCKING AND PIN FUNCTIONS.
configured as a master for the serial channel and generate both the enable and clock
signals. It can also be configured as a slave in which both the enable and clock signals are
inputs. The serial peripheral interface supports operation in a multimaster environment.
When the serial peripheral interface is a master, the SPI baud rate generator is used to
generate the SPI transmit and receive clocks. The SPI baud rate generator takes its input
from the baud rate generator clock, which is generated in the clock synthesizer of the
MPC801.
The serial peripheral interface can be
The serial peripheral interface’s SPIMISO pin is an input in master mode and an output in
slave mode. The serial peripheral interface’s SPIMOSI pin is an output in master mode and
an input in slave mode. The reason the pin names change functionality between master and
slave mode is to support a multimaster configuration that allows communication from one
serial peripheral interface to another with the same hardware configuration. When the serial
peripheral interface is a master, SPICLK is the clock output pin that shifts in the received
data from the SPIMISO pin and shifts out the transmitted data to the SPIMOSI pin.
Additionally, an SPI master device must provide a slave select signal output to enable the
SPI slave devices. You can implement this using one of the general-purpose I/O pins.
However, the SPISEL pin should not be asserted while the SPI is working as a master or an
error will occur.
When the serial peripheral interface is a slave, SPICLK is the clock input pin that shifts in
the received data from the SPIMOSI pin and shifts out the transmitted data to the SPIMISO
pin. The SPISEL pin provided by the MPC801 is the enable input to the SPI slave. When the
serial peripheral interface is in a multimaster environment, the SPISEL pin is still an input
and is used to find an error condition when more then one master is operating.
SPICLK is a gated clock (the clock toggles only while data is being transferred) and four
phase/polarity combinations of SPICLK are available. You can select any of them using two
bits in the SPI mode register. The serial peripheral interface pins can also be configured as
open-drain pins to support a multimaster configuration where the same pin can either be
driven by the MPC801 or an external SPI device.