Description
sdmmc_spi.h::sdcard spi mode initialization and identification
Purpose
sdcard
spi 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 Cmd58 to read OCR register to validate the voltage.
- If the response to Cmd58 is fail, initialize ends, the card is put into inactive state.
- If the response to Cmd58 is ok, continue to the next step.
- 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 Cmd58 to read OCR register to validate the voltage.
- If the response to Cmd58 is fail, initialize ends, the card is put into inactive state.
- If the response to Cmd58 is ok, continue to the next step.
- 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
- At this stage, the initialization and identification process is over, the following steps are done for the sdcard's succeeding operation.
- Host sends Cmd59 to turn sdcard's CRC option off.
- Host sends Cmd9 to get the Card Specific Data (CSD).
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_spi.h