Description
sdmmc_mci.h::sdcard sd mode initialization and identification
Purpose
sdcard sd mode initialization and identification sequence
Description
- Host sends Cmd0 to do card reset, card is in "idle state".
- Host sends Cmd8 and checks the response of the card, only sdcard supports physical layer version 2.00 will response correctly to Cmd8, and this command is mandatory to be sent before ACmd41 for sdcard which support physical layer version 2.00, to enable new functions or to validate a dual-voltage card.
- refer to "If Cmd8 response ok" branch for the initialize of sdcard 2.0.
- refer to "If Cmd8 response fail" branch for the initialize of sdcard 1.x, mmc card, sdcard2.0 with invalid voltage.
- If Cmd8 response ok
- Host sends ACmd41* with argument "HCS" equal to "1".
- If the response to ACmd41 failed, it means the card does not match the voltage desired by the host, the card will be put into inactive state, initialize ends.
- If the response with "CCS" equal to "1", the card is a version 2.0 high capacity sdcard, refer to "Card Initialize" for the succeeding initialize sequence.
- If the response with "CCS" equal to "0", the card is a version 2.0 standard capacity sdcard. refer to "Card Initialize" for the succeeding initialize sequence.
- If Cmd8 response fail
- Host sends ACmd41* argument "HCS" equal to "0".
- If the response to ACmd41 ok, the card is a version 1.x sdcard, refer to "Card Initialize" for the succeeding initialize sequence.
- If the response to ACmd41 fails
- Host sends Cmd0 to reset card.
- Host sends Cmd1 to card.
- If card has response to Cmd1, the card is a MMC card, refer to "Card Initialize" for the succeeding initialize sequence.
- If card has no response to Cmd1, the card is either an unknown card or a card does not match host's voltage, the initialize ends.
- Card Initialize
- Host sends Cmd2 to get the its unique card identification number (CID).
- Host sends Cmd3 to ask the card to publish a new relative card address (RCA), once the RCA is received the card state changes to the "stand-by state".
- Host sends Cmd9 to get the Card Specific Data (CSD).
- At this stage, the initialization and identification process is over, the following steps are done for the sdcard's succeeding operation.
- Host sends Cmd13 to obtain the card status, make sure the card is "ready-for-data".
- Host sends Cmd7 to transit card in "transfer state".
- If card is a sdcard*, hosts send ACmd6 to set bus to 4-wire mode.
- If card is a mmc card, the bus is set as 1-wire mode.
Notes
Send Cmd55 before send ACmd41.
sdcard include ver 1.x sdcard, ver2.0 standard capacity sdcard, ver2.0 high capacity sdcard
Source
The documentation for this Page was generated from the following file:
sdmmc_mci.h