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

SD/MMC Read Problem

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



Joined: 22 May 2006
Posts: 9

View user's profile Send private message

SD/MMC Read Problem
PostPosted: Fri Jun 02, 2006 12:07 am     Reply with quote

I am having a problem reading from an SD card. It seems to initialise OK, and doesn't return any errors when writing to the card (although as I can't read I havn't been able to confirm this).

The basic structure of the read code is as follows:

Code:
Command(CMD17,0,512,0xFF); // returns 0x00 (no error)
spi_read(0xFF); // returns 0x03 // what does this mean??
spi_read(0xFF); // returns 0xFF
spi_read(0xFF); // returns 0xFF
spi_read(0xFF); // returns 0xFF
...(forever more)
spi_read(0xFF); // returns 0xFF


I have no idea why it is reading 0x03.. and never getting to 0xFE
Edit: 0x03 indicates an 'Internal Card Controler Error". I dont know why I am getting this error.

If anyone can shed any light on this problem it would be appreciated

Matt
mbro131



Joined: 22 May 2006
Posts: 9

View user's profile Send private message

PostPosted: Fri Jun 02, 2006 1:57 am     Reply with quote

Update: I still dont know what the error is, but i found that if I remove the write block I have prior to the read then the error is removed.. This suggests that my write block has some issues..

I'll post back if I find out for sure what this is.

Matt
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