Functional Example for the MMC/SD Module
MOTOROLA
Multimedia Card/Secure Digital Host Controller Module (MMC/SD)
20-35
Code Example 20-5. Voltage_Validation
voltage_validation(voltage_range_h, voltage_range_l)
{
send_cmd_wait_resp(IO_RW_DIRECT, 0x8800, 0x0608, 0x05, 0x40);
// Reset IO card
send_cmd_wait_resp(IO_SEND_OP_COND, 0x0, 0x0, 0x04, 0x40);
// Send SDIO operation voltage command
if (End Command Response true & No. of IO functions> 0)
// it is an SDIO card
{
IORDY = 0;
while (!(IORDY in I/O ORC))
// set voltage range
{
send_cmd_wait_resp(IO_SEND_OP_COND,voltage_range_h,voltage_range_l,0x04,0x40);
}
if(Memory Present flag true)
Card = combo;
// i.e. SDIO + Memory
else
Card = sdio;
}
else
// SD or MMC
{
send_cmd_wait_resp(GO_IDLE_STATE, 0x0, 0x0, 0x80, 0x40);
// MMC, SD reset
send_cmd_wait_resp(APP_CMD, 0x0, 0x0, 0x01, 0x40);
// Application Command follows
if(End Command Response true)
{
send_cmd_wait_resp(SEND_OP_COND, 0x0, 0x0, 0x01, 0x40);
// SD card found
while(!(card init finished))
{
send_cmd_wait_resp(APP_CMD, 0x0, 0x0, 0x01, 0x40);
send_cmd_wait_resp(SEND_OP_COND, voltage_range_h, voltage_range_l,0x01,0x40);
}
Card = sd;
}
else
{
send_cmd_wait_resp(SEND_OP_COND, 0x0, 0x0, 0x01, 0x40);
// MMC card found
if(End Command Response true)
{
Card = mmc;
while(!(card init finished))
{
send_cmd_wait_resp(SEND_OP_COND,voltage_range_h,voltage_range_l,0x01,0x40);
}
}
else
{
Card = No card or failed contact;
}
}
}
}
20.7.2.4 Card Registry
Card registry differs for the MMC and the SD cards. For the MMC cards, the identification process starts
at clock rate F
od
. The SD_CMD line output drivers are open-drain and allow parallel card operation during
this process. The registration process is accomplished as follows:
1. The bus is activated.
2. The MMC/SD module broadcasts
SEND_OP_COND
(CMD1) to receive operation
conditions.
Содержание DragonBall MC9328MX1
Страница 68: ...1 12 MC9328MX1 Reference Manual MOTOROLA Introduction ...
Страница 86: ...2 18 MC9328MX1 Reference Manual MOTOROLA Signal Descriptions and Pin Assignments ...
Страница 116: ...3 30 MC9328MX1 Reference Manual MOTOROLA Memory Map ...
Страница 126: ...4 10 MC9328MX1 Reference Manual MOTOROLA ARM920T Processor ...
Страница 160: ...8 8 MC9328MX1 Reference Manual MOTOROLA System Control ...
Страница 272: ...13 32 MC9328MX1 Reference Manual MOTOROLA DMA Controller ...
Страница 281: ...Programming Model MOTOROLA Watchdog Timer Module 14 9 ...
Страница 282: ...14 10 MC9328MX1 Reference Manual MOTOROLA Watchdog Timer Module ...
Страница 300: ...15 18 MC9328MX1 Reference Manual MOTOROLA Analog Signal Processor ASP ...
Страница 438: ...18 16 MC9328MX1 Reference Manual MOTOROLA Serial Peripheral Interface Modules SPI 1 and SPI 2 ...
Страница 478: ...19 40 MC9328MX1 Reference Manual MOTOROLA LCD Controller ...
Страница 542: ...20 64 MC9328MX1 Reference Manual MOTOROLA Multimedia Card Secure Digital Host Controller Module MMC SD ...
Страница 574: ...21 32 MC9328MX1 Reference Manual MOTOROLA Memory Stick Host Controller MSHC Module ...
Страница 598: ...23 16 MC9328MX1 Reference Manual MOTOROLA Real Time Clock RTC ...
Страница 670: ...24 72 MC9328MX1 Reference Manual MOTOROLA SDRAM Memory Controller ...
Страница 726: ...25 56 MC9328MX1 Reference Manual MOTOROLA SmartCard Interface Module SIM ...
Страница 736: ...26 10 MC9328MX1 Reference Manual MOTOROLA General Purpose Timers ...
Страница 854: ...29 18 MC9328MX1 Reference Manual MOTOROLA I2C Module ...
Страница 900: ...30 46 MC9328MX1 Reference Manual MOTOROLA Synchronous Serial Interface SSI ...
Страница 942: ...32 26 MC9328MX1 Reference Manual MOTOROLA GPIO Module and I O Multiplexer IOMUX ...