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
Posted: Fri Jun 02, 2006 1:57 am
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.
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