Motorola MPC8260 User Manual

Page of 1006
MOTOROLA
Chapter 33.  Serial Peripheral Interface (SPI)  
33-3
Part IV.  Communications Processor Module
¥
When the SPI is a slave, SPICLK is the clock input that shifts received data in from 
SPIMOSI and transmitted data out through SPIMISO. SPISEL is the enable input to 
the SPI slave. In a multimaster environment, SPISEL (always an input) is used to 
detect an error when more than one master is operating.
As described in Chapter 35, ÒParallel I/O Ports,Ó SPIMISO, SPIMOSI, SPICLK, and
SPISEL are multiplexed with port B[28Ð31] signals, respectively. They are conÞgured as
SPI signals through the port B signal assignment register (PBPAR) and the Port B data
direction register (PBDIR), speciÞcally by setting PBPAR[DDn] and PBDIR[DRn]. 
33.3  ConÞguring the SPI Controller
The SPI can be programmed to work in a single- or multiple-master environment. This
section describes SPI master and slave operation in a single-master conÞguration and then
discusses the multi-master environment.
33.3.1  The SPI as a Master Device
In master mode, the SPI sends a message to the slave peripheral, which sends back a
simultaneous reply. A single master MPC8260 with multiple slaves can use general-
purpose parallel I/O signals to selectively enable slaves, as shown in Figure 33-2. To
eliminate the multimaster error in a single-master environment, the masterÕs SPISEL input
can be forced inactive by selecting port B[31] for general-purpose I/O
(PBPAR[DD31] = 0).
Figure 33-2. Single-Master/Multi-Slave Configuration
SPIMOSI
SPIMISO
SPICLK
SPISEL
Slave 0
SPIMISO
SPICLK
SPISEL
Slave 1 
Slave 2 
Master SPI 
SPIMOSI
SPIMISO
SPICLK
SPISEL
SPIMOSI
The SPISEL
SPICLK
SPIMISO
SPIMOSI
MPC8260
decoder can be
either internal or
external logic.