Information

Register does not change the state of the TX FIFO. Clearing either of the FIFOs has no
effect in the Module Disable mode. Changes to the DIS_TXF and DIS_RXF fields of the
MCR have no effect in the Module Disable mode. In the Module Disable mode, all status
bits and register flags in the module return the correct values when read, but writing to
them has no effect. Writing to the TCR during Module Disable mode has no effect.
Interrupt and DMA request signals cannot be cleared while in the Module Disable mode.
46.5 Initialization/application information
This section describes how to initialize the module.
46.5.1 How to manage queues
The queues are not part of the module, but it includes features in support of queue
management. Queues are primarily supported in SPI configuration.
1. When module executes last command word from a queue, the EOQ bit in the
command word is set to indicate it 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 (EOQF) in the SR is set.
3. The setting of the EOQF flag disables serial transmission and reception of data,
putting the module in the Stopped state. The TXRXS bit is cleared to indicate the
Stopped state.
4. The DMA can continue to fill TX FIFO until it is full or step 5 occurs.
5. Disable 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 DMA Controller.
6. Ensure all received data in RX FIFO has been transferred to memory receive queue
by reading the RXCNT in SR or by checking RFDF in the SR after each read
operation of the POPR.
7. Modify DMA descriptor of TX and RX channels for new queues
8. Flush TX FIFO by writing a 1 to the CLR_TXF bit in the MCR. Flush RX FIFO by
writing a '1' to the CLR_RXF bit in the MCR.
9. Clear transfer count either by setting CTCNT bit in the command word of the first
entry in the new queue or via CPU writing directly to SPI_TCNT field in the TCR.
Chapter 46 Serial Peripheral Interface (SPI)
K20 Sub-Family Reference Manual, Rev. 1.1, Dec 2012
Freescale Semiconductor, Inc.
Preliminary
1227
General Business Information