Intel® Stratix® 10 Hard Processor System Technical Reference Manual

ID 683222
Date 11/28/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

16.5.2.2.1. Identifying the Connected Card Type

To identify the connected card type, the following discovery sequence is needed:
  1. Reset the card width 1 or 4 bit (card_width2) and card width 8 bit (card_width1) fields in the ctype register to 0.
  2. Identify the card type as SD, MMC, SDIO or SDIO-COMBO:
    1. Send an SD/SDIO IO_SEND_OP_COND (CMD5) command with argument 0 to the card.
    2. Read resp0 on the controller. The response to the IO_SEND_OP_COND command gives the voltage that the card supports.
    3. Send the IO_SEND_OP_COND command, with the desired voltage window in the arguments. This command sets the voltage window and makes the card exit the initialization state.
    4. Check bit 27 in resp0:
      • If bit 27 is 0, the SDIO card is IO ONLY. In this case, proceed to step 5.
      • If bit 27 is 1, the card type is SDIO COMBO. Continue with the following steps.
  3. Go to Card Type is Either SDIO COMBO or Still in Initialization.
  4. Go to Determine if Card is a CE-ATA 1.1, CE-ATA 1.0, or MMC 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.

    The following list shows typical clock frequencies for various types of cards:

    • SD memory card, 25 MHz
    • MMC card device, 12.5 MHz
    • Full speed SDIO, 25 MHz
    • Low speed SDIO, 400 kHz