RM0090
To use one of the manufacturer-specific ACMDs the SD card Host must perform the
following steps:
1.
Send APP_CMD (CMD55)
The card responds to the MultiMediaCard/SD module, indicating that the APP_CMD bit
is set and an ACMD is now expected.
2.
Send the required ACMD
The card responds to the MultiMediaCard/SD module, indicating that the APP_CMD bit
is set and that the accepted command is interpreted as an ACMD. When a nonACMD
is sent, it is handled by the card as a normal MultiMediaCard command and the
APP_CMD bit in the card status register stays clear.
When an invalid command is sent (neither ACMD nor CMD) it is handled as a standard
MultiMediaCard illegal command error.
The bus transaction for a GEN_CMD is the same as the single-block read or write
commands (WRITE_BLOCK, CMD24 or READ_SINGLE_BLOCK,CMD17). In this case, the
argument denotes the direction of the data transfer rather than the address, and the data
block has vendor-specific format and meaning.
The card must be selected (in transfer state) before sending GEN_CMD (CMD56). The data
block size is defined by SET_BLOCKLEN (CMD16). The response to GEN_CMD (CMD56)
is in R1b format.
Command types
Both application-specific and general commands are divided into the four following types:
•
broadcast command (BC): sent to all cards; no responses returned.
•
broadcast command with response (BCR): sent to all cards; responses received
from all cards simultaneously.
•
addressed (point-to-point) command (AC): sent to the card that is selected; does
not include a data transfer on the SDIO_D line(s).
•
addressed (point-to-point) data transfer command (ADTC): sent to the card that is
selected; includes a data transfer on the SDIO_D line(s).
Command formats
See
Table 150 on page 1019
Commands for the MultiMediaCard/SD module
CMD
Type
Argument
index
[31:16] set to 0
CMD23 ac
[15:0] number
of blocks
[31:0] data
CMD24 adtc
address
for command formats.
Table 166. Block-oriented write commands
Response
Abbreviation
format
R1
SET_BLOCK_COUNT
R1
WRITE_BLOCK
DocID018909 Rev 11
Secure digital input/output interface (SDIO)
Defines the number of blocks which
are going to be transferred in the
multiple-block read or write command
that follows.
Writes a block of the size selected by
the SET_BLOCKLEN command.
Description
1043/1731
1067
Need help?
Do you have a question about the STM32F405 and is the answer not in the manual?
Questions and answers