Start the channel:
Write 1 in MCSPI_CHxCTRL: ENx
Stop the channel:
Write 0 in MCSPI_CHxCTRL: ENx
Main process
FIFO request routine
Write write_request_size
words to MCSPI_TXx
write_count– =
write_request_size
Return
EOW interrupt or
write_count = 0
TX empty?
Yes
No
Write_count >=
write_request_size?
Yes
No
Write
last_write_request_size
words to MCSPI_TXx
write_count = 0
Read
MCSPI_CHxSTAT
FFxTXE and EOT?
Yes
No
mcspi-047
Next command
Public Version
McSPI Basic Programming Model
www.ti.com
Figure 20-40. Transmit-Only
The difference between word count enabled or not is the condition after starting the channel:
•
Word count enable: Wait for EOW interrupt.
•
Word count disable: Wait for write_count = 0.
20.6.3.5 Receive-Only Procedure With Word Count (WCNT
≠
0)
shows the flow of a transfer in receive-only mode, with word count.
3030
Multichannel SPI
SWPU177N – December 2009 – Revised November 2010
Copyright © 2009–2010, Texas Instruments Incorporated