Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor10466661046666 SD/MMC CardMode Communication Debugging Anchor10466671046667The SD/MMC cardmode driver accesses the hardware through a port (BSP). A new BSP developed according to MCU/MPU documentation or by example must be verified step-by-step until flawless operation is achieved:

...

The (1-bit) initialization process reveals that commands can be executed and responses are returned with the proper bits in the correct byte-order. Example responses for each step in the sequence are given in Figure 12 Figure 14-5 and Figure 12 Figure 14-6. The first command executed, GO_IDLE_STATE, never receives a response from the card. Only V2 SD cards respond to SEND_IF_COND, returning the check pattern sent to the card and the accepted voltage range. The OCR register, read with SD_SEND_OP_COND or SEND_OP_COND, assumes basically the same format for all card types. Finally, the CID (card ID) and CSD (card-specific data) registers are read—the only times ‘long’ (132-bit) responses are returned. anchor

10492991049299Multiple-bit initialization (often 4-bit) when performed on a SD card further confirms that the 8-byte SCR register and 64-byte SD status can be read and that the bus width can be set in the BSP. Though all current cards support 4-bit mode operation, the SD_BUS_WIDTHS field of the SCR is checked before configure the card bus width. Afterwards, the 64-byte SD status is read to see whether the bus width change was accomplished. When first debugging a port, it may be best to force multi-bit operation disabled by returning 1 from the BSP function FSDev_SD_Card_BSP_GetBusWidthMax(). Anchor10493001049300 Image Removed

...

Image Added

Figure 14-4 Simplified SD/MMC cardmode initialization and state transitions Anchor10466771046677 Image Removed

...

Image Added

Figure 14-5 Command responses (SD card) Anchor10466791046679 Image Removed

...

Image Added

Figure 14-6 Command responses (MMC card) Anchor10466811046681 Image Removed

...

Image Added

Figure 14-7 SD SCR register Anchor10466831046683 Image Removed

...

Image Added

Figure 14-8 SD status