Chapter 20 Deserial Serial Peripheral Interface (DSPI)
MPC5602P Microcontroller Reference Manual, Rev. 4
466
Freescale Semiconductor
20.8.3.5.1
Filling the RX FIFO
The RX FIFO is filled with the received SPI data from the shift register. While the RX FIFO is not full,
SPI frames from the shift register are transferred to the RX FIFO. Every time an SPI frame is transferred
to the RX FIFO the RX FIFO counter is incremented by one.
If the RX FIFO and shift register are full and a transfer is initiated, the RFOF bit in the DSPI
x
_SR is set
indicating an overflow condition. Depending on the state of the ROOE bit in the DSPI
x
_MCR, the data
from the transfer that generated the overflow is ignored or put in the shift register. If the ROOE bit is set,
the incoming data is put in the shift register. If the ROOE bit is cleared, the incoming data is ignored.
20.8.3.5.2
Draining the RX FIFO
Host software or the eDMA can remove (pop) entries from the RX FIFO by reading the DSPI
x
_POPR. A
read of the DSPI
x
_POPR decrements the RX FIFO counter by one. Attempts to pop data from an empty
RX FIFO are ignored, the RX FIFO counter remains unchanged. The data returned from reading an empty
RX FIFO is undetermined.
Refer to
Section 20.7.2.7, “DSPI POP RX FIFO Register (DSPIx_POPR)
for more information on
DSPI
x
_POPR.
When the RX FIFO is not empty, the RX FIFO drain flag (RFDF) in the DSPI
x
_SR is set. The RFDF bit
is cleared when the RX_FIFO is empty and the eDMA controller indicates that a read from DSPI
x
_POPR
is complete; alternatively the RFDF bit can be cleared by the host writing a 1 to it.
20.8.4
DSPI baud rate and clock delay generation
The SCK_
x
frequency and the delay values for serial transfer are generated by dividing the system clock
frequency by a prescaler and a scaler with the option of doubling the baud rate.
shows conceptually how the SCK signal is generated.
Figure 20-14. Communications clock prescalers and scalers
20.8.4.1
Baud rate generator
The baud rate is the frequency of the serial communication clock (SCK_
x
). The system clock is divided
by a baud rate prescaler (defined by DSPI
x
_CTAR[PBR]) and baud rate scaler (defined by
DSPI
x
_CTAR[BR]) to produce SCK_
x
with the possibility of doubling the baud rate. The DBR, PBR, and
BR fields in the DSPI
x
_CTARs select the frequency of SCK_
x
using the following formula:
Eqn. 20-5
Prescaler
1
Scaler
1 + DBR
System Clock
SCK_x
SCK baud rate
f
SYS
PBRPrescalerValue
----------------------------------------------------------
1 DBR
+
BRScalerValue
--------------------------------------------
=
Содержание 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 ...