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  [ 5 posts ] 
Author Message
 Post subject: SAM3S : SDCard write error
PostPosted: Tue Aug 07, 2012 9:34 am 
Offline

Joined: Fri Jun 01, 2012 8:53 am
Posts: 11
Hello,

I write a SDCard driver. The command-response managing seems to work well like shows the erase test. My problem is about writing into the SDCard. When i try to write a block about 512 bytes with a known value (0x42 for all bytes), a block with a good size is written at the good place but all bytes have the value 0x00. Do you know what it's mean?

Thank you.


Top
 Profile  
 
 Post subject: Re: SAM3S : SDCard write error
PostPosted: Sat Aug 11, 2012 9:59 am 
Offline

Joined: Thu Nov 03, 2011 11:17 am
Posts: 16
maby the lines betwen mcu and sd are too long, try to reduce clock of hsmci peripheral


Top
 Profile  
 
 Post subject: Re: SAM3S : SDCard write error
PostPosted: Sat Aug 11, 2012 9:16 pm 
Offline

Joined: Fri Jun 01, 2012 8:53 am
Posts: 11
Hello kshysio,

the lines are about 2cm and i work with a 200kHz clock.

I try it with a lower speed

Thank you.


Top
 Profile  
 
 Post subject: Re: SAM3S : SDCard write error
PostPosted: Mon Aug 13, 2012 10:35 am 
Offline

Joined: Fri Jun 01, 2012 8:53 am
Posts: 11
Hello,

i have the same problem with 100Khz speed.

Thank you.


Top
 Profile  
 
 Post subject: Re: SAM3S : SDCard write error
PostPosted: Thu Aug 16, 2012 10:01 pm 
Offline

Joined: Tue Feb 05, 2008 11:46 am
Posts: 17
hello,

do you use PDC or DMA in the write command?

if yes, is the source data placed in Flash?

if yes, PDC and DMA on all existing SAM7/3/4 don't allow reading from Flash.

in this case, remove your 'const' attribute to let the data array to be copied into SRAM during startup and it should work.


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users 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: