MPC555
/
MPC556
QUEUED SERIAL MULTI-CHANNEL MODULE
MOTOROLA
USER’S MANUAL
Rev. 15 October 2000
14-34
QSPI operation is initiated by setting the SPE bit in SPCR1. Shortly after SPE is set,
the QSPI executes the command at the command RAM address pointed to by
NEWQP. Data at the pointer address in transmit RAM is loaded into the data serializer
and transmitted. Data that is simultaneously received is stored at the pointer address
in receive RAM.
When the proper number of bits have been transferred, the QSPI stores the working
queue pointer value in CPTQP, increments the working queue pointer, and loads the
next data for transfer from transmit RAM. The command pointed to by the incremented
working queue pointer is executed next, unless a new value has been written to
NEWQP. If a new queue pointer value is written while a transfer is in progress, that
transfer is completed normally.
When the CONT bit in a command RAM byte is set, PCS pins are continuously driven
to specified states during and between transfers. If the chip-select pattern changes
during or between transfers, the original pattern is driven until execution of the follow-
ing transfer begins. When CONT is cleared, the data in register PORTQS is driven be-
tween transfers. The data in PORTQS must match the inactive states of SCK and any
peripheral chip-selects used.
When the QSPI reaches the end of the queue, it sets the SPIF flag. If the SPIFIE bit
in SPCR2 is set, an interrupt request is generated when SPIF is asserted. At this point,
the QSPI clears SPE and stops unless wraparound mode is enabled.
14.7.5.1 Clock Phase and Polarity
In master mode, data transfer is synchronized with the internally-generated serial
clock SCK. Control bits, CPHA and CPOL, in SPCR0, control clock phase and polarity.
Combinations of CPHA and CPOL determine upon which SCK edge to drive outgoing
data from the MOSI pin and to latch incoming data from the MISO pin.
14.7.5.2 Baud Rate Selection
Baud rate is selected by writing a value from two to 255 into the SPBR field in SPCR0.
The QSPI uses a modulus counter to derive the SCK baud rate from the MCU IMB
clock.
The following expressions apply to the SCK baud rate:
or
SCK Baud Rate
f
SYS
2
SPBR
¥
--------------------------
=
SPBR
f
SYS
2
SCK Baud Rate Desired
¥
--------------------------------------------------------------------------
=
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
.
..