www.ti.com
ARG HIGH
RCA ADDRESS HIGH
STATUS 0
NEXT DATA BYTE DATA TX
MMC controller
register content MMC controller
register
RCA ADDRESS LOW ARG LOW
SEL/DESEL. CARD COMMAND
Select one card with relative
card address (RCA) while
de−selecting the other cards.
SET_BLOCKLEN
BLK ADDRESS LOW
BLK ADDRESS HIGH
COMMAND
ARG LOW
ARG HIGH
READ_SINGLE_BLOCK COMMAND
Load starting block address
into the high and low argument
registers. Load block
length register. Start the
operation by loading a
Is CRCWR = 1?
Is DXRDY = 1?
READ_SINGLE_BLOCK
command into the command
register.
Check CRCWR bit for any write
CRC errors.
Check DXRDY to see if a new
byte can be put in MMCDXR
register.
STOP_TRANSMISSION COMMAND Terminate the multiple−block
write operation.
3.5 MMC/SD Mode Single-Block Read Operation Using EDMA
Procedures for Common Operations
Figure 15. MMC/SD Mode Single-Block Read Operation
To perform a single-block read, the same block length needs to be set in both the MMC/SD controller andthe card. The procedure for this operation is:
1. Write the card’s relative address to the MMC argument registers (MMCARGH and MMCARGL). Loadthe high part of the address to MMCARGH and the low part of the address to MMCARGL.
2. Read card CSD to determine the card's maximum block length.
3. Use the MMC command register (MMCCMD) to send the SET_BLOCKLEN command (if the blocklength is different than the length used in the previous operation). The block length must be a multipleof 512 bytes and less then the maximum block length specified in the CSD.
4. Reset the FIFO (FIFORST bit in MMCFIFOCTL).
5. Set the FIFO direction to receive (FIFODIR bit in MMCFIFOCTL).
6. Set the access width (ACCWD bits in MMCFIFOCTL).
7. Set the FIFO threshold (FIFOLEV bit in MMCFIFOCTL).
8. Set up DMA (DMA size needs to be greater than or equal to FIFOLEV setting).
9. Use MMCCMD to send the READ _BLOCK command to the card.
10. Wait for DMA sequence to complete.
11. Use the MMC status register 0 (MMCST0) to check for errors.
SPRUE30B – September 2006 Multimedia Card (MMC)/Secure Digital (SD) Card Controller 35Submit Documentation Feedback