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 support@ccsinfo.com

SDCARD Block Reading

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



Joined: 09 Jun 2013
Posts: 153

View user's profile Send private message Visit poster's website

SDCARD Block Reading
PostPosted: Sat Aug 10, 2013 10:16 pm     Reply with quote

Sorry to ask, can't get a straight answer or I'm not getting it.

Looking for the CMD command that helps tell me if an SDCARD is in 32BIT addressing mode...

addr 0 is sector 0, addr 512 is sector 1, addr 1024 sector 2......

I found some of the cards are

addr 0 is sector 0, addr 1 is sector 1....

I know there is a SET BLOCK size somewhere (and that works ok)
I have a few 2gig, and 8 SDHC (clearly marked) but i can't figure out when i need to manually use
addr = address <<9
or not bother?

Can someone point me in the right direction or a direct answer?
Greatly appreciated... thanks
Ttelmah



Joined: 11 Mar 2010
Posts: 19447

View user's profile Send private message

PostPosted: Sun Aug 11, 2013 1:11 am     Reply with quote

CMD 8, then CMD 58.

A basic SD card won't respond to CMD8.
Read section 4.3, of the SD card physical layer spec (V2).

Then CMD58 reads the memory OCR. Bit 6 of the first byte of this specifies SDHC.

Best Wishes
neochrome32



Joined: 09 Jun 2013
Posts: 153

View user's profile Send private message Visit poster's website

PostPosted: Sun Aug 11, 2013 2:12 am     Reply with quote

LOVE YOU!!!!! thank you...
gonna take a peak at this now...

been looking at V3 specs..
must have missed it
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