Altera Cyclone V Device Handbook page 711

Hide thumbs Also See for Cyclone V:
Table of Contents

Advertisement

cv_54011
2013.12.30
• The card executes its internal initialization process.
• A SEND_IF_COND command is not issued before the SD_SEND_OP_COND command.
• The ACMD41 command is issued. In the command argument, the Host Capacity Support (HCS)
bit is set to 0, for a high capacity SD card.
4. Use the following sequence to determine whether the card is a CE-ATA 1.1, CE-ATA 1.0, or MMC device:
a. Determine whether the card is a CE-ATA v1.1 card device by attempting to select ATA mode. Send
the SD/SDIO SEND_IF_COND command, querying byte 504 (S_CMD_SET) of the EXT_CSD register
block in the external card.
• If bit 4 is set to 1, the card device supports ATA mode. Send the SWITCH_FUNC (CMD6)
command, setting the ATA bit (bit 4) of the EXT_CSD register slice 191 (CMD_SET) to 1. This
command selects ATA mode and activates the ATA command set.
You can verify the currently selected mode by reading it back from byte 191 of the EXT_CSD
register.
Skip to
• If the card device does not support ATA mode, it might be an MMC card or a CE-ATA v1.0 card.
Continue to
b. Determine whether the card is a CE-ATA 1.0 card device or an MMC card device by sending the
RW_REG command. If a response is received and the response data contains the CE-ATA signature,
the card is a CE-ATA 1.0 card device. Otherwise, the card is an MMC card device.
5. At this point, the software has determined the card type as SD/SDHC, SDIO or SDIO-COMBO. Now it
must enumerate the card stack according to the type that has been discovered.
6. Set the card clock source frequency to the frequency of identification clock rate, 400 KHz. Use one of the
following discovery command sequences:
• For an SD card or an SDIO memory section, send the following SD/SDIO command sequence:
• GO_IDLE_STATE
• SEND_IF_COND
• SD_SEND_OP_COND (ACMD41)
• ALL_SEND_CID (CMD2)
• SEND_RELATIVE_ADDR (CMD3)
• For an SDIO card, send the following command sequence:
• IO_SEND_OP_COND.
• If the function count is valid, send the SEND_RELATIVE_ADDR command.
• For an MMC, send the following command sequence:
• GO_IDLE_STATE
• SEND_OP_COND (CMD1)
• ALL_SEND_CID
• SEND_RELATIVE_ADDR
7. You can change the card clock frequency after discovery by writing a value to the clkdiv register that
divides down the sdmmc_clk clock.
SD/MMC Controller
Send Feedback
step
5.
Step
b.
Identifying the Connected Card Type
11-33
Altera Corporation

Advertisement

Table of Contents
loading

Table of Contents