NO:
W90P710 Programming Guide
VERSION:
2.1
PAGE:
107
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed,
distributed or reproduced without permission from Winbond.
Table No.: 1200-0003-07-A
8.5.2 Get Response from SD/MMC Card
1. Set
RI_EN
bit of
SDICR
register to enable response input.
2. Polling
RI_EN
bit of
SDICR
register until it was cleared
3. Check
CRC-7
bit of
SDIISR
register. And then the response information was put at
SDRSP0
and
SDRPS1
register
8.5.3 SD/MMC to Buffer Access
1. Set
WrSel
bit of
SDGCR
register to select buffer for use. Set
[011]
is use buffer0, and set
[111]
is use buffer1
2. Set
SDBLEN
register to
0x1FF
. One block is 512 bytes. The value of this register should be
count+1.
3. Send READ_SINGLE_BLOCK command to the card
4. Set
DI_EN
bit of
SDICR
register to enable data input
5. Polling
DI_EN
bit of
SDICR
register until it was cleared, or waiting for
DI_IS
interrupt bit of
SDIISR
register.
6. Check the CRC-16 bit of
SDIISR
register
8.5.4 Buffer to SD/MMC Access
1. Set
RdSel
bit of
SDGCR
register to select buffer for use. Set
[011]
is use buffer0, and set
[111]
is use buffer1
2. Send WRITE_LOCK command to the card
3. Set
SDBLEN
register to
0x1FF
. The host will automatic add 1 to be the block size. One block
is 512 bytes
4. Set
DO_EN
bit of
SDICR
register to enable data output.
5. Polling
DO_EN
bit of
SDICR
register until it was cleared, or waiting for
DO_IS
interrupt bit of
SDISR
register
6. Check the CRC bit of
SDIISR
register