15-16 Intel® PXA26x Processor Family Developer’s Manual
MultiMediaCard Controller
15.4.1 Start and Stop Clock
The set of registers is accessed by stopping the clock, writing the regist ers, and starting the clock.
The software stops the clock, as follows:
1. Write 0x01 in MMC_STRPCL to stop the MMC clock.
2. Write 0x0f in MMC_I_MASK to mask all interrupts exce pt th e MMC_ I_REG[ CLK_I S_OF F]
interrupt.
3. Wait for the MMC_I_REG[CLK_IS_OFF] interrupt.
To start the clock the software writes 0x02 in MMC_STRPCL .
15.4.2 Initialize
Card initialization sequences must be prefixed with 80 clock cycles. To generate 80 clock cycles
before any command, the software must set the MMC_CMDAT[INIT] bit.
15.4.3 Enabling SPI Mode
To communicate with a card in SPI mode, the software must set the MMC_SPI register as follows:
1. MMC_SPI[SPI_EN] must be set to 1.
2. MMC_SPI[SPI_CS_EN] must be set to 1.
3. MMC_SPI[SPI_CS_ADDRESS] must be set to specify the card that the software wants to
address. A 1 enables CS0 and a 0 enables CS1.
Note: When the card is in SPI mode, the only way to return to MMC mode is by toggling power to the
card.
15.4.4 No Data Command and Response Sequence
For the basic no data transfer, command and response transaction, the software must:
1. Turn the clock off, as described in chapter in Section15.4.1, “Start and Stop Clock”.
2. Write the command index in the MMC_CMD[CMD_INDEX] bits.
3. Write the command argument in the MMC_ARGH and MMC_ARGL registers.
4. Write the MMC_CMDAT registe r se t as follows:
a. Write 0b00 to MMC_CMDAT[RESPONS E_FORMAT].
b. Clear the MMC_CMDAT[DATA_EN] bit.
c. Clear the MMC_CMDAT[BUSY] bit, unless the card may respond busy.
d. Clear the MMC_CMDAT[INIT] bit.
5. Write MMC_RESTO register with the appropriate value.
6. Write 0x1b in MMC_I_MASK to unmask the MMC_I_REG[END_CMD_RES] interrupt.
7. Start the clock, as described in Section15.4.1, “Start and Stop Clock”