Difference between microSD and SD protocols?

Papabravo

Joined Feb 24, 2006
22,116
What does the specification say? What spec you say. Well it's hard to answer such a question without a copy of the specification so tracking one down should be job #1
 

nsaspook

Joined Aug 27, 2009
16,471
Hi, I was just wondering if there was a difference between the SPI protocols with microSD and standard sized SD. Thanks!
The difference is between SD and SDHC cards. It's easier to interface with SDHC cards because the data storage protocol is mainly block oriented vice byte for older SD cards.
 

Papabravo

Joined Feb 24, 2006
22,116
The difference is between SD and SDHC cards. It's easier to interface with SDHC cards because the data storage protocol is mainly block oriented vice byte for older SD cards.
Well even the SPI protocol on the SD Cards is Block Oriented so I'm not sure of the relevance of your comment. I think it would be helpful if the OP could articulate his requirements to a deeper level.
 

nsaspook

Joined Aug 27, 2009
16,471
Well even the SPI protocol on the SD Cards is Block Oriented so I'm not sure of the relevance of your comment. I think it would be helpful if the OP could articulate his requirements to a deeper level.
Not really, at the SPI command level SD cards are byte addressed. Most drivers hide this fact at the routine interface level.
SDHC cards can not be accessed to the byte level the way a SD card can unless you buffer an entire block.

How to support SDC Ver2 and high capacity cards

After the card enters idle state with a CMD0, send a CMD8 with argument of 0x000001AA and correct CRC prior to initialization process. When the CMD8 is rejected with an illigal command error (0x05), the card is SDC V1 or MMC. When the CMD8 is accepted, R7 response (R1(0x01) and trailing 32 bit data) will be returned. The lower 12 bits in the return value 0x1AA means that the card is SDC V2 and it can work at voltage range of 2.7 to 3.6 volts. If not the case, the card must be rejected. And then initiate initialization with ACMD41 with HCS (bit 30). After the initialization completed, read OCR and check CCS (bit 30) in the OCR. When it is set, subsequent data read/write operations that described below are commanded in block address insted of byte address. The block size is always fixed to 512 bytes.
http://elm-chan.org/docs/mmc/mmc_e.html

Aside from the different initialization, the new protocol did include minor changes. One change is that the
SDHC card uses physical sector addressing (similar to ATA disk drives), but the SD cards use memory
addressing (similar to RAM).
Also, the SECTOR_SIZE was set to 512 bytes, in contrast to the variable size as described in v.1.x. To
assure compatibility and ease of use, it is recommended to use the same sector size with each card type.
http://www.google.com/url?sa=t&source=web&cd=3&ved=0CBwQFjAC&url=http%3A%2F%2Fwww.freescale.com%2Ffiles%2Fmicrocontrollers%2Fdoc%2Fapp_note%2FAN3805.pdf&ei=d5JcTPLkIIXUtQPw89TUDQ&usg=AFQjCNHCKHHObB2FZu9Uzu5J6BUnLjr1Xg&sig2=v1edeSbbT17mOs8XnACf2A
 
Last edited:

Papabravo

Joined Feb 24, 2006
22,116
I see. So you say the SD Card is "byte addressed" because you can start a transfer at any byte location and read from 1 to N bytes where N may or may not have an upper limit.

By comparison you seem to be saying that in the SDHC card you can begin only on a sector boundary and you must(?) read the entire sector.

Did I get that right?
 

nsaspook

Joined Aug 27, 2009
16,471
I see. So you say the SD Card is "byte addressed" because you can start a transfer at any byte location and read from 1 to N bytes where N may or may not have an upper limit.

By comparison you seem to be saying that in the SDHC card you can begin only on a sector boundary and you must(?) read the entire sector.

Did I get that right?
That's it in a nut shell. For a SD card, N is up to 512 (BLOCK_LEN normally) but a SD cards (READ_BL_LEN) can be up to 2kBytes on large cards. This makes buffer size/capacity calculations a little more complex on a general SD card vs pure SDHC driver.

http://en.wikipedia.org/wiki/SDHC#Compatibility_issues_with_4.C2.A0GB_and_larger_cards
http://www.hjreggel.net/cardspeed/special-sd.html
 
Top