Chapter 20 Deserial Serial Peripheral Interface (DSPI)
MPC5602P Microcontroller Reference Manual, Rev. 4
Freescale Semiconductor
469
Eqn. 20-10
shows an example of the computed t
PCSSCK
delay.
shows an example of the computed the t
PASC
delay.
20.8.5
Transfer formats
The SPI serial communication is controlled by the serial communications clock (SCK_
x
) signal and the
CS
x
signals. The SCK_
x
signal provided by the master device synchronizes shifting and sampling of the
data by the SIN_
x
and SOUT_
x
pins. The CS
x
signals serve as enable signals for the slave devices.
When the DSPI is the bus master, the CPOL and CPHA bits in the DSPI clock and transfer attributes
registers (DSPI
x
_CTAR
n
) select the polarity and phase of the serial clock, SCK_
x
. The polarity bit selects
the idle state of the SCK_
x
. The clock phase bit selects if the data on SOUT_
x
is valid before or on the first
SCK_
x
edge.
When the DSPI is the bus slave, CPOL and CPHA bits in the DSPI
x
_CTAR0 (SPI slave mode) select the
polarity and phase of the serial clock. Even though the bus slave does not control the SCK signal, clock
polarity, clock phase and number of bits to transfer must be identical for the master device and the slave
device to ensure proper transmission.
The DSPI supports four different transfer formats:
•
Classic SPI with CPHA = 0
•
Classic SPI with CPHA = 1
•
Modified transfer format with CPHA = 0
•
Modified transfer format with CPHA = 1
A modified transfer format is supported to allow for high-speed communication with peripherals that
require longer setup times. The DSPI can sample the incoming data later than halfway through the cycle
to give the peripheral more setup time. The MTFE bit in the DSPI
x
_MCR selects between classic SPI
format and modified transfer format. The classic SPI formats are described in
SPI transfer format (CPHA = 0)
and
Section 20.8.5.2, “Classic SPI transfer format (CPHA = 1).”
The
modified transfer formats are described in
Section 20.8.5.3, “Modified SPI transfer format (MTFE = 1,
Section 20.8.5.4, “Modified SPI transfer format (MTFE = 1, CPHA = 1).”
Table 20-23. Peripheral Chip Select strobe assert computation example
PCSSCK
Prescaler
f
SYS
Delay before transfer
0b11
7
100 MHz
70.0 ns
Table 20-24. Peripheral Chip Select strobe negate computation example
PASC
Prescaler
f
SYS
Delay after transfer
0b11
7
100 MHz
70.0 ns
t
PASC
=
PASC
f
SYS
1