1 start and stop clock, Write 0x01 in mmc_strpcl to stop the mmc clock, Wait for the mmc_i_reg[clk_is_off] interrupt – Intel PXA26X User Manual

Page 528: 2 initialize, 3 enabling spi mode, Mmc_spi[spi_en] must be set to 1, Mmc_spi[spi_cs_en] must be set to 1, 4 no data command and response sequence, Write the mmc_cmdat register set as follows, A. write 0b00 to mmc_cmdat[response_format

Advertising
background image

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 registers, 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 except the MMC_I_REG[CLK_IS_OFF]

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

Section 15.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 register set as follows:

a. Write 0b00 to MMC_CMDAT[RESPONSE_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

Section 15.4.1, “Start and Stop Clock”

Advertising