The Spi As A Master Device - Motorola MPC8260 PowerQUICC II User Manual

Motorola processor users manual
Table of Contents

Advertisement

¥ 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
(PBPAR[DD31] = 0).
decoder can be
either internal or
Figure 33-2. Single-Master/Multi-Slave Configuration
MOTOROLA
by
selecting
MPC8260
SPIMOSI
SPIMISO
SPICLK
Master SPI
The SPISEL
external logic.
Chapter 33. Serial Peripheral Interface (SPI)
Part IV. Communications Processor Module
port
B[31]
for
Slave 0
SPIMOSI
SPIMISO
SPICLK
SPISEL
Slave 1
SPIMOSI
SPIMISO
SPICLK
SPISEL
Slave 2
SPIMOSI
SPIMISO
SPICLK
SPISEL
general-purpose
I/O
33-3

Advertisement

Table of Contents
loading

Table of Contents