English
Language : 

K60P100M100SF2RM Datasheet, PDF (1644/1809 Pages) Freescale Semiconductor, Inc – K60 Sub-Family Reference Manual
Initialization/application of SDHC
• Software reset (host only) is proceed by the write operation on the SYSCTL[RSTD],
SYSCTL[RSTC], or SYSCTL[RSTA] bits to reset the data part, command part, or
all parts of the host controller, respectively
• Card reset (card only). The command, "Go_Idle_State" (CMD0), is the software reset
command for all types of MMC cards, SD Memory cards, and CE-ATA cards. This
command sets each card into the idle state regardless of the current card state. For an
SD I/O Card, CMD52 is used to write an I/O reset in the CCCR. The cards are
initialized with a default relative card address (RCA = 0x0000) and with a default
driver stage register setting (lowest speed, highest driving current capability).
After the card is reset, the host needs to validate the voltage range of the card.The
following diagram illustrates the software flow to reset both the SDHC and the card.
For CE-ATA device that supports ATA mode, before issuing CMD0 to reset the MMC
layer, two CMD39 should be issued back-to-back to the ATA control register. The first
CMD39 shall have the SRST bit set to one. The second CMD39 command shall have the
SRST bit cleared to zero.
write “1” to RSTA bit to reset SDHC
Send 80 clocks to card
send CMD0/CMD52 to card to reset card
V oltage V alidation
Figure 52-40. Flow chart for reset of the SDHC and SD I/O card
software_reset()
{
set_bit(SYSCTRL, RSTA); // software reset the Host
set DTOCV and SDCLKFS bit fields to get the SD_CLK of frequency around 400kHz
configure IO pad to set the power voltage of external card to around 3.0V
poll bits CIHB and CDIHB bits of PRSSTAT to wait both bits are cleared
set_bit(SYSCTRL, INTIA); // send 80 clock ticks for card to power up
send_command(CMD_GO_IDLE_STATE, <other parameters>); // reset the card with CMD0
or send_command(CMD_IO_RW_DIRECT, <other parameters>);
}
1644
K60 Sub-Family Reference Manual, Rev. 6, Nov 2011
Freescale Semiconductor, Inc.