VS1005g Datasheet
10 VS1005 PERIPHERALS AND REGISTERS
10.10.4 SD Card Interface
Vs1005 has a SD card interface which supports 1-bit and 4-bit data bus.
SD Card Interface Registers
Reg Type Reset Abbrev
Description
0xFC7C
0xFC7D
0xFC7E
0xFC7F
r/w
r/w
r/w
r/w
0
0
0
0
SD_PNTR SD card memory address pointer
SD_LEN
SD_CF
SD_ST
SD card data length, in bytes
SD card configuration register
SD card status register
SD_PNTR is the 11-bit memory pointer register.
SD_LEN defines the number of bytes that are read from or written to SD card. The length is
given in bytes.
SD_CF Bits
Name
Bits Description
SD_CF_NCRCTX
SD_CF_NCRCRST
SD_CF_4BIT
12 Do not send crc (continued operation)
11 Do not reset crc register (continued operation)
10 Use 4-bit data bus mode
SD_CF_ENA
7
6
5
4
3
2
1
0
Start SD card transfer
Read (1) or write (0) select
SD_CF_RDWRX
SD_CF_CMDDATX
SD_CF_NOSTR
SD_CF_NOSTP
SD_CF_CRC16
SD_CF_CRC7
Command or data transfer select
Skip data start bit (continued operation)
Do not add data stop bit (continued operation)
Enable crc16 calculation during write
Enable crc7 calculation during write
Poll for start bit when read
SD_CF_POLL
SD_CF_NCRCTX makes the interface to skip crc transfer.
SD_CF_NCRCRST makes the interface to continues crc calculation from previous transfer.
SD_CF_4BIT forces the interface to use 4-bit data transfer instead of 1-bit if set.
SD_CF_ENA start SD card read or write transfer when set.
SD_CF_RDWRX register selects between read and write transfers.
SD_CF_CMDDATX register selects between command and data transfers.
SD_CF_NOSTP register forces the interface to skip start bit when set.
SD_CF_NOSTP register forces the interface to skip stop bit when set.
SD_CF_CRC16 and SD_CF_CRC7 enable the crc calculation. Crc is send automatically if
SD_CF_NCRCTX is reset.
SD_CF_POLL forces the SD card interface to search for start bit when reading command re-
sponse or data. If start bit is not found during 256 SD clock cycles the operation is cancelled
and SD_ST_NOSTR error flag is set.
Version: 0.2, 2012-03-16
63