DMA Serial Peripheral Interface (DSPI)
MCF52277 Reference Manual, Rev. 1
29-36
Freescale Semiconductor
29.5
Initialization/Application Information
29.5.1
How to Change Queues
DSPI queues are not part of the DSPI module, but the DSPI includes features in support of queue
management. This section presents an example of how to change queues for the DSPI.
1. The last command word from a queue is executed. The EOQ bit in the command word is set to
indicate to the DSPI that this is the last entry in the queue.
2. At the end of the transfer, corresponding to the command word with EOQ set is sampled, the EOQ
flag, DSPI_SR[EOQF] is set.
3. The setting of the EOQF flag disables serial transmission and serial reception of data, putting the
DSPI in the stopped state. The TXRXS bit is cleared to indicate the stopped state.
4. The eDMA continues to fill TX FIFO until it is full or step 5 occurs.
5. Disable DSPI DMA transfers by disabling the DMA enable request for the DMA channel assigned
to TX FIFO and RX FIFO. This is done by clearing the corresponding DMA enable request bits in
the eDMA controller.
6. Ensure all received data in RX FIFO has been transferred to memory receive queue by reading the
DSPI_SR[RXCNT] bit or by checking the DSPI_SR[RFDF] bit after each read operation of the
DSPI_POPR register.
7. Modify DMA descriptor of TX and RX channels for new queues.
8. Flush TX FIFO by writing a 1 to the DSPI_MCR[CLR_TXF] bit; Flush RX FIFO by writing a 1
to the DSPI_MCR[CLR_RXF] bit.
9. Clear transfer count by setting the CTCNT bit in the command word of the first entry in the new
queue or via CPU writing directly to the DSPI_TCR[SPI_TCNT] field.
10. Enable DMA channel by enabling the DMA enable request for the DMA channel assigned to the
DSPI TX FIFO, and RX FIFO by setting the corresponding DMA set enable request bit.
11. Enable serial transmission and serial reception of data by clearing the EOQF bit.
29.5.2
Switching Master and Slave Mode
When changing modes in the DSPI, follow the steps below to guarantee proper operation.
1. Halt the DSPI by setting DSPI_MCR[HALT].
2. Clear the transmit and receive FIFOs by writing a 1 to the CLR_TXF and CLR_RXF bits in
DSPI_MCR.
3. Set the appropriate mode in DSPI_MCR[MSTR] and enable the DSPI by clearing
DSPI_MCR[HALT].
29.5.3
Baud Rate Settings
shows the baud rate generated based on the combination of the baud rate prescaler PBR and
the baud rate scaler BR in the DSPI_CTAR
n
registers. The values calculated assume a 100 MHz system
frequency.
Содержание MCF52277
Страница 1: ...MCF52277 Reference Manual Devices Supported MCF52274 MCF52277 Document Number MCF52277RM Rev 1 04 2008...
Страница 22: ...MCF52277 Reference Manual Rev 1 Freescale Semiconductor xxii...
Страница 32: ...MCF52277 Reference Manual Rev 0 xxxii Freescale Semiconductor...
Страница 60: ...Signal Descriptions MCF52277 Reference Manual Rev 1 2 16 Freescale Semiconductor...
Страница 112: ...Enhanced Multiply Accumulate Unit EMAC MCF52277 Reference Manual Rev 1 4 20 Freescale Semiconductor...
Страница 128: ...Static RAM SRAM MCF52277 Reference Manual Rev 1 6 6 Freescale Semiconductor...
Страница 140: ...Clock Module MCF52277 Reference Manual Rev 1 7 12 Freescale Semiconductor...
Страница 172: ...Chip Configuration Module CCM MCF52277 Reference Manual Rev 1 9 16 Freescale Semiconductor...
Страница 180: ...Serial Boot Facility SBF MCF52277 Reference Manual Rev 1 10 8 Freescale Semiconductor...
Страница 188: ...Reset Controller Module MCF52277 Reference Manual Rev 1 11 8 Freescale Semiconductor...
Страница 210: ...Crossbar Switch XBS MCF52277 Reference Manual Rev 1 13 8 Freescale Semiconductor...
Страница 480: ...Liquid Crystal Display Controller LCDC MCF52277 Reference Manual Rev 1 21 44 Freescale Semiconductor...
Страница 510: ...Touchscreen Controller Analog to Digital Converter MCF52277 Reference Manual Rev 1 22 30 Freescale Semiconductor...
Страница 542: ...FlexCAN MCF52277 Reference Manual Rev 1 23 32 Freescale Semiconductor...
Страница 568: ...Pulse Width Modulation PWM Module MCF52277 Reference Manual Rev 1 24 26 Freescale Semiconductor...
Страница 640: ...Programmable Interrupt Timers PIT0 PIT1 MCF52277 Reference Manual Rev 1 27 8 Freescale Semiconductor...
Страница 690: ...DMA Serial Peripheral Interface DSPI MCF52277 Reference Manual Rev 1 29 40 Freescale Semiconductor...
Страница 724: ...UART Modules MCF52277 Reference Manual Rev 1 30 34 Freescale Semiconductor...
Страница 740: ...I2 C Interface MCF52277 Reference Manual Rev 1 31 16 Freescale Semiconductor...
Страница 790: ...Debug Module MCF52277 Reference Manual Rev 1 32 50 Freescale Semiconductor...