Main process
Start the channel:
Set SPIm.MCSPI_CHxCTRL[0] EN bit to 1
LAST_TRANSFER = TRUE
Interrupt routine
Read SPIm.MCSPI_IRQSTATUS
Write SPIm.MCSPI_IRQSTATUS
to reset channel status bits
TX empty?
WRITE_COUNT < w?
LAST_TRANSFER
= TRUE
Write SPIm.MCSPI_TXx
WRIT=1
Return
Read
SPIm.MCSPI_CHxSTAT
SPIm.
MCSPI_CHxSTAT[2:1]
= 0x3?
Stop the channel:
Set SPIm.MCSPI_CHxCTRL[0] EN bit to 0
Next command
mcspi-023
Yes
No
No
Yes
Yes
No
Public Version
McSPI Basic Programming Model
www.ti.com
20.6.2.4 Transmit-Only Procedure
20.6.2.4.1 Based on Interrupt Requests
shows the handling procedure for words transmitted by interrupt in transmit-only mode. The
main process flow shows how the end-of-transfer must be done after all words are received for this mode.
Figure 20-29. Transmit-Only With Interrupts (Master and Slave)
20.6.2.4.2 Transmit-Only Based on DMA Write Requests
In
, the main process shows completion of the transfer of words in transmit-only mode with
DMA write requests.
When the DMA handler completes w interface accesses, WRITE_COUNT is assigned the value w.
3016
Multichannel SPI
SWPU177N – December 2009 – Revised November 2010
Copyright © 2009–2010, Texas Instruments Incorporated