Information
Enhanced Secure Digital Host Controller
MPC8308 PowerQUICC II Pro Processor Reference Manual, Rev. 1
11-50 Freescale Semiconductor
select a common voltage range or if a notification should be sent to the system when a non-usable cards in
the stack is detected.
The following steps illustrate how to perform voltage validation when a card is inserted:
voltage_validation(voltage_range_arguement)
{
label the card as UNKNOWN;
send_command(IO_SEND_OP_COND, 0x0, <other parameters are omitted>);
// CMD5, check SDIO operation voltage, command argument is zero
if (RESP_TIMEOUT != wait_for_response(IO_SEND_OP_COND)) { // SDIO command is accepted
if (0 < number of IO functions) {
label the card as SDIO;
IORDY = 0;
while (!(IORDY in IO OCR response)) { // set voltage range for each IO function
send_command(IO_SEND_OP_COND, <voltage range>, <other parameter>);
wait_for_response(IO_SEND_OP_COND);
} // end of while ...
} // end of if (0 < ...)
if (memory part is present inside SDIO card) label the card as SDCombo;
// this is an SD-Combo card
} // end of if (RESP_TIMEOUT...)
if (the card is labeled as SDIO card) return;
// card type is identified and voltage range is set, so exit the function;
send_command(APP_CMD, 0x0, <other parameters are omitted>);
// CMD55, application specific CMD prefix
if (no error calling wait_for_response(APP_CMD, <...>) { // CMD55 is accepted
send_command(SD_APP_OP_COND, <voltage range>, <...>);
// ACMD41, to set voltage range for memory part or SD card
wait_for_response(SD_APP_OP_COND); // voltage range is set
if (card type is UNKNOWN) label the card as SD;
return;
} // end of if (no error ...
else if (errors other than timeout occur) { // command/response pair is corrupted
respond to it by program specific manner;
} // of else if (response timeout)
else { // CMD55 is refused, it must be MMC or CE-ATA card
if (card is already labeled as SD Combo) { // change label
re-label the card as SDIO;
ignore the error or report it;
return; // card is identified as SDIO card
} // of if (card is ...)
send_command(SEND_OP_COND, <voltage range>, <...>);
if (RESP_TIMEOUT == wait_for_response(SEND_OP_COND)) {
// CMD1 is not accepted, either
label the card as UNKNOWN;
return;
} // of if (RESP_TIMEOUT...)
if (check for CE-ATA signature succeeded) { // the card is CE-ATA
store CE-ATA specific info from the signature;
label the card as CE-ATA;
} // of if (check for CE-ATA...)
else label the card as MMC;
} // of else
}