CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Question to MMC experts. Why 0x40?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

Question to MMC experts. Why 0x40?
PostPosted: Tue Mar 25, 2008 9:01 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Mar 25, 2008 9:47 pm     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Thu Mar 27, 2008 6:58 pm     Reply with quote

Thanks!

ckielstra wrote:
...the latest v4.3 specification is available free of charge at http://www.mmca.org/compliance/buy_spec/.


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

View user's profile Send private message

PostPosted: Thu Mar 27, 2008 9:22 pm     Reply with quote

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. Crying or Very sad

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).
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group