![](http://datasheet.mmic.net.cn/30000/MC68EN360FE33_datasheet_2368935/MC68EN360FE33_641.png)
Serial Peripheral Interface (SPI)
MC68360 USER’S MANUAL
higher rates (6.25MHz in master mode and 12.5MHz in slave
mode). If multiple characters are to be transferred, a gap should
be inserted between transmission so that it will not exceed the
maximum data rate.
7.12.5 SPI Programming Model
The following paragraphs describe the registers in the SPI.
7.12.5.1 SPI MODE REGISTER (SPMODE). SPMODE is a read-write register that controls
both the SPI operation mode and the SPI clock source. SPMODE is cleared by reset.
Bit 15—Reserved
This bit should be cleared by the user.
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. (Loopback mode does not invert the SPI data, as do some
SPI-type devices such as the MC68302.)
0 = Normal operation.
1 = The SPI is in loopback mode.
CI—Clock Invert
The CI bit inverts the SPI clock polarity (refer to Figure 7-81 and Figure 7-82).
0 = The inactive state of SPICLK is low.
1 = The inactive state of SPICLK is high.
CP—Clock Phase
The CP bit selects one of two fundamentally different transfer formats (refer to Figure 7-
81 and Figure 7-82).
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
The DIV16 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 BRGCLK as the input to the SPI baud rate generator.
1 = Use the BRGCLK/16 as the input to the SPI baud rate generator.
REV—Reverse Data
The REV bit determines the receive and transmit character bit order.
0= Reverse data—LSB of character transmitted and received first.
1= Normal operation—MSB of character transmitted and received first.
15
14
13
12
11
10
9876543210
—
LOOP
CI
CP
DIV16
REV
M/S
EN
LEN
PM3
PM2
PM1
PM0
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.