No, The data lines
are in use
Start
Read the MMCi.MMCHS_PSTATE[1]
DATI bit
DATI = 0x0
Yes, The data lines are not in use
Configure and enable the DMA channel
(see the DMA chapter)
Is there any error
Disable the DMA channel
(see the DMA chapter)
End
Yes
Read the MMCi.MMCHS_STAT
register
TC = 0x1
Yes
Transfer complete
No
(DEB or DCRC
or DTO) = 0x1
Set MMCi.MMCHS_SYSCTL[26] SRD
bits to 0x1 and wait until it returns to
0x0
Disable the DMA channel
(see the DMA chapter)
End
For
MMC and SD only:
Is Auto-CMD12
enabled
Read the MMCi.MMCHS_STAT[24]
ACE bit and verify if there are errors by
reading the MMCi.MMCHS_AC12
register
Send CMD12 for MMC and
SD cards
CMD52 for SDIO cards
No
(or for SDIO)
Yes
The STOP command is
automatically sent to the card
End
Do you
want to interrupt
the transfer
No
Send CMD12 for MMC and SD
cards
CMD52 for SDIO cards
Read the MMCi.MMCHS_STAT[1] TC
bit
TC = 0x1
No
Yes
Disable the DMA channel
(see the DMA chapter)
End
Yes
A STOP command can be
sent to interrupt the
data transfer
Disable the DMA channel
(see the DMA chapter)
Send a data command
(see command transfer flow)
A
No
No
Yes
An error occurred
during the data transfer
A
mmchs-033
Public Version
www.ti.com
MMC/SD/SDIO Basic Programming Model
Figure 24-38. MMC/SD/SDIO Controller Read/Write Transfer Flow in DMA Mode With Polling
3403
SWPU177N – December 2009 – Revised November 2010
MMC/SD/SDIO Card Interface
Copyright © 2009–2010, Texas Instruments Incorporated