1 data transfer operation – Rainbow Electronics AT91CAP9S250A User Manual

Page 766

Advertising
background image

766

6264A–CAP–21-May-07

AT91CAP9S500A/AT91CAP9S250A

Figure 41-7. 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

specification).

41.8.1

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 man-
age 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.

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

Yes

Wait for command

ready status flag

Check error bits in the

status register

(1)

0

1

Advertising