![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 570](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_1721827570.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
570 of 1441
NXP Semiconductors
UM10503
Chapter 22: LPC43xx/LPC43Sxx SD/MMC interface
•
Enumerates all connected cards
•
Sets the RCA for the connected cards
•
Reads card-specific information
•
Stores card-specific information locally
Enumerate_Card_Stack - Enumerates the card connected on the module. The card can
be of the type MMC, CE-ATA, SD, or SDIO. All types of SDIO cards are supported; that is,
SDIO_IO_ONLY, SDIO_MEM_ONLY, and SDIO_COMBO cards. The enumeration
sequence includes the following steps:
1. Check if the card is connected.
2. Clear the bits in the card_type register. Clear the register bit for a 1-bit, 4-bit, or 8-bit
bus width.
3. Identify the card type; that is, SD, MMC, or SDIO.
–
Send CMD5 first. If a response is received, then the card is SDIO
–
If not, send ACMD41; if a response is received, then the card is SD.
–
Otherwise, the card is an MMC or CE-ATA
4. Enumerate the card according to the card type.
Use a clock source with a frequency = Fod (that is, 400 KHz) and use the following
enumeration command sequence:
–
SD card - Send CMD0, ACMD41, CMD2, CMD3.
–
SDHC card - send CMD0, SDCMD8, ACMD41, CMD2, CMD3
–
SDIO - Send CMD5; if the function count is valid, CMD3. For the SDIO memory
section, follow the same commands as for the SD card.
–
MMC - Send CMD0, CMD1, CMD2, CMD3
5. Identify the MMC/CE-ATA device.
–
Selecting ATA mode for a CE-ATA device.
–
Cpu should query the byte 504 (S_CMD_SET) of EXT_CSD register by sending
CMD8. If bit 4 is set to 1, then the device supports ATA mode.
–
If ATA mode is supported, the cpu should select the ATA mode by setting the ATA
bit (bit 4) of the EXT_CSD register slice 191(CMD_SET) to activate the ATA
command set for use. The cpu selects the command set using the SWITCH
(CMD6) command.
–
The current mode selected is shown in byte 191 of the EXT_CSD register.
If the device does not support ATA mode, then the device can be an MMC device
or a CE-ATA v1.0 device.
–
Send RW_REG; if a response is received and the response data contains CE-ATA
signature, the device is a CE-ATA device.
–
Otherwise the device is an MMC card.
6. You can change the card clock frequency after enumeration.
22.7.4.3 Clock Programming
The clock programming has to be done in the CGU. The cclk_in has to be equal to the
cclk_out. Therefore the registers that support this have to be: