GD32F403xx User Manual
507
20.5.
Card functional description
20.5.1.
Card registers
Within the card interface registers are defined: OCR, CID, CSD, EXT_CSD, RCA, DSR and
SCR. These can be accessed only by corresponding commands. The OCR, CID, CSD and
SCR registers carry the card/content specific information, while the RCA and DSR registers
are configuration registers storing actual configuration parameters. The EXT_CSD register
carries both, card specific information and actual configuration parameters. For specific
information, please refer to the relevant specifications.
OCR register
: The 32-bit operation conditions register (OCR) stores the V
DD
voltage profile
of the card and the access mode indication (MMC). In addition, this register includes a status
information bit. This status bit is set if the card power up procedure has been finished. The
register is a little different between MMC and SD card. The host can use CMD1 (MMC),
ACMD41 (SD memory), CMD5 (SD I/O) to get the content of this register.
CID register
: The Card Identification (CID) register is 128 bits wide. It contains the card
identification information used during the card identification phase. Every individual
Read/Write (RW) card shall have a unique identification number. The host can use CMD2 and
CMD10 to get the content of this register.
CSD register
: The Card-Specific Data register provides information regarding access to the
card contents. The CSD defines the data format, error correction type, maximum data access
time, data transfer speed, whether the DSR register can be used, etc. The programmable part
of the register can be changed by CMD27. The host can use CMD9 to get the content of this
register.
Extended CSD Register
: Just MMC4.2 has this register. The Extended CSD register defines
the card properties and selected modes. It is 512 bytes long. The most significant 320 bytes
are the Properties segment, which defines the card capabilities and cannot be modified by
the host. The lower 192 bytes are the Modes segment, which defines the configuration the
card is working in. These modes can be changed by the host by means of the SWITCH
command. The host can use CMD8 (just MMC supports this command) to get the content of
this register.
RCA register
: The writable 16-bit relative card address register carries the card address that
is published by the card during the card identification. This address is used for the addressed
host-card communication after the card identification procedure. The host can use CMD3 to
ask the card to publish a new relative address (RCA).
Note
: The default value of the RCA register is 0x0001(MMC) or 0x0000(SD/SD I/O). The
default value is reserved to set all cards into the Stand-by State with CMD7.
DSR register (Optional)
: The 16-bit driver stage register can be optionally used to improve
the bus performance for extended operating conditions (depending on parameters like bus