www.ti.com
2.8 Reset Considerations
2.8.1 Software Reset Considerations
2.8.2 Hardware Reset Considerations
2.9 Initialization
2.9.1 MMC/SD Controller Initialization
2.9.2 Initializing the MMC Control Register (MMCCTL)
Peripheral Architecture
The MMC/SD peripheral has two reset sources: hardware reset and software reset.
A software reset (such as a reset that the emulator generates) does not cause the MMC/SD controllerregisters to alter. After a software reset, the MMC/SD controller continues to operate as it was configuredprior to the reset.
A hardware reset of the processor causes the MMC/SD controller registers to return to their default valuesafter reset.
The general procedure for initializing the MMC/SD controller is given in the following steps. Details aboutthe registers or register bit fields to be configured in the MMC/SD mode are in the subsequentsubsections.
1. Place the MMC/SD controller in its reset state by setting the CMDRST bit and DATRST bit in the MMCcontrol register (MMCCTL). You can set other bits in MMCCTL after reset.
2. Write the required values to other registers to complete the MMC/SD controller configuration.
3. Clear the CMDRST bit and the DATRST bit in MMCCTL to release the MMC/SD controller from itsreset state. It is recommended not to rewrite the values that are written to the other bits of MMCCTL inStep 1 .
4. Enable the SD_CLK pin so that the memory clock is sent to the memory card by setting the CLKEN bitin the MMC memory clock control register (MMCCLK).
Note: The MMC/SD cards require a clock frequency of 400 kHz or less for the card initializationprocedure. Make sure that the memory clock confirms this requirement. Once cardinitialization completes, you can adjust the memory clock up to the lower of the cardcapabilities or the maximum frequency that is supported.
The bits in the MMC control register (MMCCTL) affect the operation of the MMC/SD controller. Thesubsections that follow help you decide how to initialize each of control register bits.
In the MMC/SD mode, the MMC/SD controller must know how wide the data bus must be for the memorycard that is connected. If an MMC card is connected, specify a 1-bit data bus (WIDTH = 0 in MMCCTL); ifan SD card is connected, specify a 4-bit data bus (WIDTH = 1 in MMCCTL).
To place the MMC/SD controller in its reset state and disable it, set the CMDRST bit and DATRST bit inMMCCTL. The first step of the MMC/SD controller initialization process is to disable both sets of logic.When initialization is complete, but before you enable the SD_CLK pin, clear the CMDRST bit andDATRST bit in MMCCTL to enable the MMC/SD controller.
SPRUE30B – September 2006 Multimedia Card (MMC)/Secure Digital (SD) Card Controller 23Submit Documentation Feedback