Texas Instruments TMS320DM644x Benutzerhandbuch

Seite von 61
www.ti.com
3
Procedures for Common Operations
3.1
Card Identification Operation
3.1.1
MMC Card Identification Procedure
Procedures for Common Operations
Before the MMC/SD controller starts data transfers to or from memory cards in the MMC/SD native mode,
it must first identify how many cards are present on the bus and configure them. For each card that
responds to the ALL_SEND_CID broadcast command, the controller reads that card’s unique card
identification address (CID) and then assigns it a relative address (RCA). This address is much shorter
than the CID and the MMC/SD controller uses this address to identify the card in all future commands that
involve the card.
Only one card completes the response to ALL_SEND_CID at any one time. The absence of any response
to ALL_SEND_CID indicates that all cards have been identified and configured.
Note:
The following steps assume that the MMC/SD controller is configured to operate in MMC
or SD mode, and the memory clock frequency on the CLK pin is set for 400 kHz or less.
The procedure for a card identification operation is issued in open-drain bus mode for both MMC and SD
cards.
The MMC card identification procedure is:
1. Use the MMC command register (MMCCMD) to issue the GO_IDLE_STATE (CMD0) command to the
MMC cards. Using MMCCMD to issue the CMD0 command puts all cards (MMC and SD) in the idle
state and no response from the cards is expected.
2. Use MMCCMD to issue the SEND_OP_CMD (CMD1) command with the voltage range supported (R3
response, if it is successful; R1b response, if the card is expected to be busy). Using MMCCMD to
issue the CMD1 command allows the host to identify and reject cards that do not match the VDD
range that the host supports.
3. If the response in step 2 is R1b (that is, the card is still busy due to power up), then go back to step 2.
If the card is not busy, continue to step 4.
4. Use MMCCMD to send the ALL_SEND_CID (CMD2) command (R2 response is expected) to the MMC
cards. Using MMCCMD to send the CMD2 command notifies all cards to send their unique card
identification (CID) number. There should only be one card that successfully sends its full CID number
to the host. The successful card goes into the identification state and does not respond to this
command again.
5. Use MMCMD to issue the SET_RELATIVE_ADDR (CMD3) command (R1 response is expected) in
order to assign an address that is shorter than the CID number that will be used in the future to
address the card in the future data transfer mode.
Note:
This command is only addressed to the card that successfully sent its CID number in
step 4. This card now goes into standby mode. This card also changes its output drivers
from open-drain to push-pull. It stops replying to the CMD2 command, allowing for the
identification of other cards.
6. Repeat step 4 and step 5 to identify and assign relative addresses to all remaining cards until no card
responds to the CMD1 command. No card responding within 5 memory clock cycles indicates that all
cards have been identified and the MMC card identification procedure terminates.
The sequence of events in this operation is shown in
.
SPRUE30B – September 2006
Multimedia Card (MMC)/Secure Digital (SD) Card Controller
29