34.4.4.1 Transmit by DMATransmit by DMA is supported only when TXDMAE is set. A transmit DMA request isasserted when both SPE and SPTEF are set. Then the on-chip DMA controller detectsthis request and transfers data from memory into the SPI data register. After that, TXDMA DONE is asserted to clear SPTEF automatically. This process repeats until all datafor transmission (the number is decided by the configuration register[s] of the DMAcontroller) is sent.After DMA transfers the first byte to the SPI data register, the SPI pushes this data intothe shifter, thereby making SPTEF high again. This generates another DMA requestimmediately, but the CPU lacks enough time to service the first DMA interrupt servicerequest (ISR). The subsequent DMA request is paced at the SPI transfer rate. Manage thisbehavior during the first byte transfer through the DMA channel. Write the first byte tothe SPI data register via the CPU. The other bytes are transmitted by the DMA.Configure SPI before TransmissionRESETConfigure DMA Controllerfor SPI transmissionSet SPE=1 to start transmission inmaster mode or enable SPI fortransmission in slave modeWait for interrupt(s) of DMA Controllerindicating end of SPI transmissionRead SPI status registerWrite the first byte to SPI data registervia CPUSet TXDMAE to enable Transmit byDMAFigure 34-16. Recommended startup of SPI transmit by DMAFunctional DescriptionKL04 Sub-Family Reference Manual, Rev. 3.1, November 2012572 Freescale Semiconductor, Inc.