View previous topic :: View next topic |
Author |
Message |
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
Question to MMC experts. Why 0x40? |
Posted: Tue Mar 25, 2008 9:01 pm |
|
|
Colleagues,
The CCS MMC driver ORs every command byte with 0x40 before sending it to the card over SPI. Why is it doing that? Where does 0x40 come from?
I’ve searched the SanDisk manual (http://www.sandisk.com/Assets/File/OEM/Manuals/manual-rs-mmcv1.0.pdf). I couldn’t find the answer. But I confirmed my question. Chapter 5.6 mentions CMD0 and 0x40 (= 0x40 | 0x00) in the same paragraph.
Thanks,
- Nick _________________ Read the label, before opening a can of worms. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Mar 25, 2008 9:47 pm |
|
|
Just for your information, here a link to a newer version of the Sandisk document: http://www.sandisk.com/Assets/File/OEM/Manuals/ProdManRS-MMCv1.3.pdf
The Sandisk manual is valid for the MMC v3.3 specification (cards up to 2Gb). For capacities above 2Gb you need the v4 specifications, the latest v4.3 specification is available free of charge at http://www.mmca.org/compliance/buy_spec/.
For the source of the 0x40 value a short explanation is given in the Sandisk Manual chapter 4.6.2. A more detailed description can be found at page 16 of the MMC v4.3 specification.
Every command starts with:
- a start bit: 0
- a 'transmitter bit' indicating the command source: 1 = host command, 0 = card response
Together that's your 0x40 value. |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Thu Mar 27, 2008 6:58 pm |
|
|
Thanks!
I've downloaded this spec.
MMC spec v4.3 wrote: |
9 SPI mode
SPI mode was removed in V4.3.
|
_________________ Read the label, before opening a can of worms. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Thu Mar 27, 2008 9:22 pm |
|
|
MMC spec v4.3 wrote: |
9 SPI mode
SPI mode was removed in V4.3.
| Oops, I don't get a good feeling from that.
From the old and widely used MMC spec v3.1, Chapter 7.1: Quote: | The SPI mode consists of a secondary, optional communication protocol which is offered by Flash-based
MultiMediaCards. | So it has always been optional...
I'm not sure how much impact this new standard is going to have. The standard is called eMMC (Embedded MMC), maybe we are lucky and this standard will not become widely used.
Note that for SD cards the SPI mode is compulsory, except for microSD where it is optional. And yes, you should be able to use your MMC driver software without modifications for an SD card (no guarantee given). |
|
|
|