English
Language : 

PXS20RM Datasheet, PDF (348/1368 Pages) Freescale Semiconductor, Inc – PXS20 Microcontroller
Deserial Serial Peripheral Interface (DSPI)
the DSPI only responds to transfers initiated by a bus master external to the DSPI and the SPI command
field space is used for 16 most significant bit of the transmit data.
16.4.2.1 Master Mode
In SPI master mode the DSPI initiates the serial transfers by controlling the Serial Communications Clock
(SCK) and the Peripheral Chip Select (PCS) signals. The SPI command field in the executing TX FIFO
entry determines which CTAR registers will be used to set the transfer attributes and which PCS signal to
assert. The command field also contains various bits that help with queue management and transfer
protocol. See Section 16.3.2.7, DSPI PUSH TX FIFO Register (DSPI_PUSHR), for details on the SPI
command fields. The data field in the executing TX FIFO entry is loaded into the shift register and shifted
out on the Serial Out (SOUT) pin. In SPI master mode, each SPI frame to be transmitted has a command
associated with it allowing for transfer attribute control on a frame by frame basis.
16.4.2.2 Slave Mode
In SPI slave mode the DSPI responds to transfers initiated by a SPI bus master. The DSPI does not initiate
transfers. Certain transfer attributes such as clock polarity, clock phase and frame size must be set for
successful communication with a SPI master. The SPI slave mode transfer attributes are set in the
DSPI_CTAR0.
16.4.2.3 FIFO Disable Operation
The FIFO disable mechanisms allow SPI transfers without using the TX FIFO or RX FIFO. The DSPI
operates as a double-buffered simplified SPI when the FIFOs are disabled. The FIFOs are disabled
separately; setting the DSPI_MCR[DIS_TXF] bit disables the TX FIFO, and setting the
DSPI_MCR[DIS_RXF] bit disables the RX FIFO.
The FIFO Disable mechanisms are transparent to the user and to host software; Transmit data and
commands are written to the DSPI_PUSHR and received data is read from the DSPI_POPR.When the TX
FIFO is disabled the TFFF, TFUF and TXCTR fields in DSPI_SR behave as if there is a one-entry FIFO
but the contents of the DSPI_TXFR registers and TXNXTPTR are undefined. Likewise, when the RX
FIFO is disabled, the RFDF, RFOF and RXCTR fields in the DSPI_SR behave as if there is a one-entry
FIFO, but the contents of the DSPI_RXFR registers and POPNXTPTR are undefined.
16.4.2.4 Transmit First In First Out (TX FIFO) Buffering Mechanism
The TX FIFO functions as a buffer of SPI data and SPI commands for transmission. The TX FIFO holds
1–5 words, each consisting of a command field and a data field. The number of entries in the TX FIFO is
SoC specific. SPI commands and data are added to the TX FIFO by writing to the DSPI PUSH TX FIFO
Register (DSPI_PUSHR). TX FIFO entries can only be removed from the TX FIFO by being shifted out
or by flushing the TX FIFO.
The TX FIFO Counter field (TXCTR) in the DSPI Status Register (DSPI_SR) indicates the number of
valid entries in the TX FIFO. The TXCTR is updated every time the DSPI _PUSHR is written or SPI data
is transferred into the shift register from the TX FIFO.
16-28
PXS20 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor