Datasheet

2017 Microchip Technology Inc. DS60001516A-page 573
SAM9G20
Figure 34-9: Command/Response Functional Flow Diagram
Note 1: If the command is SEND_OP_COND, the CRC error flag is always present (refer to R3 response in the MultiMedia Card spec-
ification).
34.7.2 Data Transfer Operation
The MultiMedia Card allows several read/write operations (single block, multiple blocks, stream, etc.). These kind of transfers can be
selected setting the Transfer Type (TRTYP) field in the MCI Command Register (MCI_CMDR).
These operations can be done using the features of the Peripheral DMA Controller (PDC). If the PDCMODE bit is set in MCI_MR, then all
reads and writes use the PDC facilities.
In all cases, the block length (BLKLEN field) must be defined either in the mode register MCI_MR, or in the Block Register MCI_BLKR.
This field determines the size of the data block.
Enabling PDC Force Byte Transfer (PDCFBYTE bit in the MCI_MR) allows the PDC to manage with internal byte transfers, so that transfer
of blocks with a size different from modulo 4 can be supported. When PDC Force Byte Transfer is disabled, the PDC type of transfers are
in words, otherwise the type of transfers are in bytes.
Consequent to MMC Specification 3.1, two types of multiple block read (or write) transactions are defined (the host can use either one at
any time):
Open-ended/Infinite Multiple block read (or write):
RETURN OK
RETURN ERROR
(1)
Set the command argument
MCI_ARGR = Argument
(1)
Set the command
MCI_CMDR = Command
Read MCI_SR
CMDRDY
Status error flags?
Read response if required
Ye s
Wait for command
ready status flag
Check error bits in the
status register
(1)
0
1