Datasheet

553
SAM9261 [DATASHEET]
Atmel-6062O-ATARM-SAM9261-Datasheet_21-Jun-16
The argument register (MCI_ARGR) contains the argument field of the command.
To send a command, the user must perform the following steps:
Fill MCI_ARGR with the command argument.
Set MCI_CMDR (see Table 34-5).
The command is sent immediately after writing the command register. The status bit CMDRDY in the Status
Register (MCI_SR) is asserted when the command is completed.
While the card maintains a busy indication (at the end of a STOP_TRANSMISSION command CMD12, for
example), a new command shall not be sent. The NOTBUSY flag in the status register (MCI_SR) is asserted when
the card releases the busy indication.
If the command requires a response, it can be read in the MCI Response Register (MCI_RSPR). The response
size can be from 48 bits up to 136 bits depending on the command. The MCI embeds an error detection to prevent
any corrupted data during the transfer.
The following flowchart shows how to send a command to the card and read the response if needed. In this
example, the status register bits are polled but setting the appropriate bits in the Interrupt Enable Register
(MCI_IER) allows using an interrupt method.