Chapter 20 Deserial Serial Peripheral Interface (DSPI)
MPC5602P Microcontroller Reference Manual, Rev. 4
464
Freescale Semiconductor
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.
Refer to
Section 20.7.2.6, “DSPI PUSH TX FIFO Register (DSPIx_PUSHR)
for details on the SPI
command fields.
20.8.3.2
SPI slave mode
In SPI slave mode the DSPI responds to transfers initiated by an 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 an SPI master. The SPI slave mode transfer attributes are set in the
DSPI
x
_CTAR0.
20.8.3.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 TX and RX FIFOs are
disabled separately. The TX FIFO is disabled by writing a 1 to the DIS_TXF bit in the DSPI
x
_MCR. The
RX FIFO is disabled by writing a 1 to the DIS_RXF bit in the DSPI
x
_MCR.
The FIFO disable mechanisms are transparent to the user and to host software; transmit data and
commands are written to the DSPI
x
_PUSHR and received data is read from the DSPI
x
_POPR. When the
TX FIFO is disabled, the TFFF, TFUF, and TXCTR fields in DSPI
x
_SR behave as if there is a one-entry
FIFO but the contents of the DSPI
x
_TXFRs and TXNXTPTR are undefined. When the RX FIFO is
disabled, the RFDF, RFOF, and RXCTR fields in the DSPI
x
_SR behave as if there is a one-entry FIFO but
the contents of the DSPI
x
_RXFRs and POPNXTPTR are undefined.
Disable the TX and RX FIFOs only if the FIFO must be disabled as a requirement of the application's
operating mode. A FIFO must be disabled before it is accessed. Failure to disable a FIFO prior to a first
FIFO access is not supported, and can result in incorrect results.
20.8.3.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
five entries, each consisting of a command field and a data field. SPI commands and data are added to the
TX FIFO by writing to the DSPI push TX FIFO register (DSPI
x
_PUSHR). For more information on
DSPI
x
Section 20.7.2.6, “DSPI PUSH TX FIFO Register (DSPIx_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
x
_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.
Refer to
Section 20.7.2.4, “DSPI Status Register (DSPIx_SR)
x
_SR.
The TXNXTPTR field indicates which TX FIFO entry is transmitted during the next transfer. The
TXNXTPTR contains the positive offset from DSPI
x
_TXFR0 in number of 32-bit registers. For example,
TXNXTPTR equal to two means that the DSPI
x
_TXFR2 contains the SPI data and command for the next
Содержание SAFE ASSURE Qorivva MPC5601P
Страница 2: ...MPC5602P Microcontroller Reference Manual Rev 4 2 Freescale Semiconductor ...
Страница 4: ...MPC5602P Microcontroller Reference Manual Rev 4 4 Freescale Semiconductor ...
Страница 62: ...Chapter 2 MPC5602P Memory Map MPC5602P Microcontroller Reference Manual Rev 4 62 Freescale Semiconductor ...
Страница 104: ...Chapter 4 Clock Description MPC5602P Microcontroller Reference Manual Rev 4 104 Freescale Semiconductor ...
Страница 128: ...Chapter 6 Power Control Unit MC_PCU MPC5602P Microcontroller Reference Manual Rev 4 128 Freescale Semiconductor ...
Страница 272: ...Chapter 12 e200z0 and e200z0h Core MPC5602P Microcontroller Reference Manual Rev 4 272 Freescale Semiconductor ...
Страница 280: ...Chapter 14 Crossbar Switch XBAR MPC5602P Microcontroller Reference Manual Rev 4 280 Freescale Semiconductor ...
Страница 306: ...Chapter 16 Internal Static RAM SRAM MPC5602P Microcontroller Reference Manual Rev 4 306 Freescale Semiconductor ...
Страница 380: ...Chapter 17 Flash Memory MPC5602P Microcontroller Reference Manual Rev 4 380 Freescale Semiconductor ...
Страница 532: ...Chapter 21 LIN Controller LINFlex MPC5602P Microcontroller Reference Manual Rev 4 532 Freescale Semiconductor ...
Страница 578: ...Chapter 22 FlexCAN MPC5602P Microcontroller Reference Manual Rev 4 578 Freescale Semiconductor ...
Страница 708: ...Chapter 25 FlexPWM MPC5602P Microcontroller Reference Manual Rev 4 708 Freescale Semiconductor ...
Страница 742: ...Chapter 26 eTimer MPC5602P Microcontroller Reference Manual Rev 4 742 Freescale Semiconductor ...
Страница 760: ...Chapter 27 Functional Safety MPC5602P Microcontroller Reference Manual Rev 4 760 Freescale Semiconductor ...
Страница 782: ...Chapter 28 Fault Collection Unit FCU MPC5602P Microcontroller Reference Manual Rev 4 782 Freescale Semiconductor ...
Страница 788: ...Chapter 29 Wakeup Unit WKPU MPC5602P Microcontroller Reference Manual Rev 4 788 Freescale Semiconductor ...
Страница 798: ...Chapter 30 Periodic Interrupt Timer PIT MPC5602P Microcontroller Reference Manual Rev 4 798 Freescale Semiconductor ...
Страница 816: ...Chapter 32 Cyclic Redundancy Check CRC MPC5602P Microcontroller Reference Manual Rev 4 816 Freescale Semiconductor ...
Страница 848: ...Chapter 33 Boot Assist Module BAM MPC5602P Microcontroller Reference Manual Rev 4 848 Freescale Semiconductor ...
Страница 930: ...Chapter 36 Nexus Development Interface NDI MPC5602P Microcontroller Reference Manual Rev 4 930 Freescale Semiconductor ...