Card Functional Description; Card Identification Mode; Card Reset - ST STM32F101 series Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32F101 series:
Table of Contents

Advertisement

Secure digital input/output interface (SDIO)
1.
Do the card identification process
2.
Increase the SDIO_CK frequency
3.
Select the card by sending CMD7
4.
Configure the DMA2 as follows:
a)
b)
c)
d)
5.
Send CMD24 (WRITE_BLOCK) as follows:
a)
b)
c)
d)
e)
6.
Check that no channels are still enabled by polling the DMA Enabled Channel Status
register.
22.4

Card functional description

22.4.1

Card identification mode

While in card identification mode the host resets all cards, validates the operation voltage
range, identifies cards and sets a relative card address (RCA) for each card on the bus. All
data communications in the card identification mode use the command line (CMD) only.
22.4.2

Card reset

The GO_IDLE_STATE command (CMD0) is the software reset command and it puts the
MultiMediaCard and SD memory in the Idle state. The IO_RW_DIRECT command (CMD52)
resets the SD I/O card. After power-up or CMD0, all cards output bus drivers are in the high-
impedance state and the cards are initialized with a default relative card address
(RCA=0x0001) and with a default driver stage register setting (lowest speed, highest driving
current capability).
571/1128
Enable DMA2 controller and clear any pending interrupts
Program the DMA2_Channel4 source address register with the memory location's
base address and DMA2_Channel4 destination address register with the
SDIO_FIFO register address
Program DMA2_Channel4 control register (memory increment, not peripheral
increment, peripheral and source width is word size)
Enable DMA2_Channel4
Program the SDIO data length register (SDIO data timer register should be
already programmed before the card identification process)
Program the SDIO argument register with the address location of the card where
data is to be transferred
Program the SDIO command register: CmdIndex with 24 (WRITE_BLOCK);
WaitResp with '1' (SDIO card host waits for a response); CPSMEN with '1' (SDIO
card host enabled to send a command). Other fields are at their reset value.
Wait for SDIO_STA[6] = CMDREND interrupt, then program the SDIO data control
register: DTEN with '1' (SDIO card host enabled to send data); DTDIR with '0'
(from controller to card); DTMODE with '0' (block data transfer); DMAEN with '1'
(DMA enabled); DBLOCKSIZE with 0x9 (512 bytes). Other fields are don't care.
Wait for SDIO_STA[10] = DBCKEND
DocID13902 Rev 15
RM0008

Advertisement

Table of Contents
loading

This manual is also suitable for:

Stm32f107 seriesStm32f102 seriesStm32f103 seriesStm32f105 seriesStm32f101 series

Table of Contents