
Serial Communication Modules
16-20
MPC801 USER’S MANUAL
MOTOROLA
16
16.3.2.4 PROGRAMMING THE SERIAL PERIPHERAL INTERFACE.
16.3.2.4.1 SPI Mode Register.
The read/write SPI mode (SPMODE) register controls both
the SPI operation mode and clock source. This register is cleared by reset.
Bits 0 and 5—Reserved
These bits are reserved and should be set to zero.
LOOP—Loop Mode
When set, this bit selects the local loopback operation. The transmitter output is internally
connected to the receiver input; the receiver and transmitter operate normally except that
the received data is ignored.
0 = Normal operation.
1 = The serial peripheral interface is in loopback mode.
CI—Clock Invert
This bit inverts the SPI clock polarity (refer to Figures 4-3 and 4-4 for details).
0 = The inactive state of SPICLK is low.
1 = The inactive state of SPICLK is high.
CP—Clock Phase
This bit selects one of two fundamentally different transfer formats.
0 = SPICLK begins toggling at the middle of the data transfer.
1 = SPICLK begins toggling at the beginning of the data transfer.
DIV16—Divide By 16
This bit selects the clock source for the SPI baud rate generator when configured as an SPI
master. In slave mode, the clock source is the SPICLK pin.
0 = Use the baud rate generator clock as the input to the SPI baud rate generator.
1 = Use the BRGCLK/16 as the input to the SPI baud rate generator.
M/S—Master/Slave
This bit configures the serial peripheral interface to operate as a master or slave.
0 = The serial peripheral interface is a slave.
1 = The serial peripheral interface is a master.
SPMODE
BIT
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FIELD
RES
LOOP
CI
CP
DIV16
RES
M/S
EN
CL
RESERVED
PM