Serial Peripheral Interface (SPI)
MSC8144E Reference Manual, Rev. 3
Freescale Semiconductor
18-43
18.9.1.2 SPI as a Slave Device
In slave mode, the SPI receives messages from an SPI master and sends a simultaneous reply.
The slave’s SPI_SL must be asserted before Rx clocks are recognized; once SPI_SL is asserted,
SPI_CK becomes an input from the master to the slave. SPI_CK can be any frequency from DC
to QUICC Engine clk/4.
To prepare for data transfers, the slave’s core processor writes data to be sent into a buffer,
configures a TxBD with TxBD[R] set, and configures one or more RxBDs. The core processor
then sets SPCOM[STR] to activate the SPI. Once SPI_SL is asserted, the slave shifts data out
from SPI_MISO and in through SPI_MOSI. A maskable interrupt is issued when a full buffer
finishes receiving and sending or after an error. The SPI uses successive RxBDs in the table to
continue reception until it runs out of Rx buffers or SPI_SL is deasserted.
Transmission continues until no more data is available or SPI_SL is deasserted. If it is deasserted
before all data is sent, it stops but the TxBD stays open. Transmission continues once SPI_SL is
reasserted and SPI_CK begins toggling. After the characters in the buffer are sent, the SPI sends
ones as long as SPI_SL remains asserted.
Note:
When enabling the SPI or changing parameters in SPI Mode Register (like CP,CI),
SPI_SL must remain deasserted for at least 2 QUICC Engine clk/2 clocks afterwards.
Also if SPI_SL is deasserted between transfers, its deassertion time should be at least 2
QUICC Engine clk/2 clocks.
18.9.2 SPI in Multi-Master Operation
The SPI can operate in a multi-master environment in which SPI devices are connected to the
same bus. In this configuration, the SPI_MOSI, SPI_MISO, and SPI_CK signals of all SPIs are
shared; the SPI_SL inputs are connected separately, as shown in Figure 18-23. Only one SPI
device at a time can act as a master—all others must be slaves. When an SPI is configured as a
master and its SPI_SL input is asserted, a multi master error occurs because more than one SPI
device is a bus master. The SPI sets SPIE[MME] in the SPI event register and a maskable
interrupt is issued to the QUICC Engine subsystem. It also disables SPI operation and the output
drivers of SPI signals. The core processor must clear SPMODE[EN] before the SPI is used again.
After correcting the problems, clear SPIE[MME] and re-enable the SPI.
The maximum sustained data rate that the SPI supports is QUICC Engine clk/50. However, the
SPI can transfer a single character at much higher rates—QUICC Engine clk/8 in master mode
and QUICC Engine clk/4 in slave mode. Gaps should be inserted between multiple characters to
keep from exceeding the maximum sustained data rate.
Summary of Contents for MSC8144E
Page 1: ...MSC8144E Reference Manual Quad Core Media Signal Processor MSC8144ERM Rev 3 July 2009 ...
Page 48: ...MSC8144E Reference Manual Rev 3 xlviii Freescale Semiconductor ...
Page 86: ...MSC8144E Reference Manual Rev 3 1 38 Freescale Semiconductor Overview ...
Page 168: ...MSC8144E Reference Manual Rev 3 3 60 Freescale Semiconductor External Signals ...
Page 242: ...MSC8144E Reference Manual Rev 3 5 26 Freescale Semiconductor Reset ...
Page 314: ...MSC8144E Reference Manual Rev 3 8 24 Freescale Semiconductor General Configuration Registers ...
Page 414: ...MSC8144E Reference Manual Rev 3 10 14 Freescale Semiconductor MSC8144E SC3400 DSP Subsystem ...
Page 452: ...MSC8144E Reference Manual Rev 3 11 38 Freescale Semiconductor Internal Memory Subsystem ...
Page 520: ...MSC8144E Reference Manual Rev 3 12 68 Freescale Semiconductor DDR SDRAM Memory Controller ...
Page 1070: ...MSC8144E Reference Manual Rev 3 21 28 Freescale Semiconductor Timers ...