Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Problem with multipile Read from SDCARD in AT91SAM7X256
PostPosted: Fri Jul 15, 2011 5:49 am 
Offline

Joined: Wed Feb 03, 2010 4:09 pm
Posts: 2
Hello everybody
I am trying to store 1000 bytes on SDCard using the following code :
//***********************************************
for(k=0;k<512;k++)
{
MMCBuffer[k]=1;
}
Sector_No=1;
for(k=0;k<1000;k++)
{
error = SD_WriteBlock(&sdDrv, Sector_No, 1, MMCBuffer);
Sector_No++
}
//***********************************************
till here everything is fine and I have tested that data is written successfully.
but when I try to read this data back using the following code
for(k=0;k<1000;k++)
{
error = SD_ReadBlock(&sdDrv,k, 1, MMCBuffer);

}
I get the following error:

-E- Failed to send Command(1)
------------------------------------------------------------------
It means that I can write sequentially in SD_Card but Can't read sequentially from it!!!!
I am using ATMEL example code's in KEIL
All suggestion and recommendation are welcommed.
Regards
Hamid Reza


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 2 guests


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 post attachments in this forum

Search for:
Jump to: