Preparing SD cards for fastest write?

Started by Peabody February 25, 2010
Tell me if there's a more appropriate group for this.  Anyway...

My friend flies RC airplanes, and has recently bought a "Keychain 
Spy DVR" at Ebay for something like $16.  The good news, aside 
from the $16, is that it shoots 720x480P video, with audio, at 30 
fps for about 50 minutes on one battery charge, with a 4GB micro 
SDHC card.  So he just attaches this sucker on the wing or 
fuselage, and comes up with some very nice video.  Youtube has lots 
of examples of these videos - search on 808 camera, or 808 
keychain.

There's a fairly long list of bad news items, one of which is that 
the video stutters, pauses, or jumps now and then.  So it will be 
going along smoothly, but then seems to freeze, then jump ahead, 
with something clearly being lost.  But this is in the video only, 
not in the audio, which is glitch free.  Analysis by others in 
VirtualDub indicates the frozen stretches are indeed duplicate 
frames.

On the chance it might help, my friend bought a class 6 SDHC to use 
with this camera, and indeed it did seem to significantly reduce 
the stuttering at first.  But with more use, the improvement 
doesn't seem so great.

In researching this, I've come across SD Formatter, available here:

http://www.sdcard.org/consumers/formatter/

One of the formatting options is to fully "erase" the card. Now I 
know that NAND-gate flash memory can read randomly, but has to be 
erased, in blocks, before a write.  So once you fill up a new card, 
deleting the files, or even formatting the card, may still leave 
you with a card that's pretty much completely un-erased, and I 
would think that would slow down any subsequent write process, 
which for this camera is proceeding at 1.3MB/sec.

1. Can someone confirm that the SD card keeps track of which blocks 
are currently erased.  In other words, it doesn't automatically 
erase every block it writes to.  If it keeps track, then erasing 
everything ahead of time might speed things up.

2. Does using the full erase formatting option reduce the life of 
the card materially?

I'm doubtful that slow writing is the primary cause of the freezing 
video, but it's possible that for $16 you don't get a lot of 
multi-tasking, and if writing to memory could be speeded up, maybe 
whatever IS causing the problem would happen less often.

And for those interested, the definitive source on this camera is 
here:

http://www.chucklohr.com/808/

Thanks for any ideas.


Peabody wrote:


> One of the formatting options is to fully "erase" the card. Now I > know that NAND-gate flash memory can read randomly, but has to be > erased, in blocks, before a write. So once you fill up a new card, > deleting the files, or even formatting the card, may still leave > you with a card that's pretty much completely un-erased, and I > would think that would slow down any subsequent write process, > which for this camera is proceeding at 1.3MB/sec. > > 1. Can someone confirm that the SD card keeps track of which blocks > are currently erased. In other words, it doesn't automatically > erase every block it writes to. If it keeps track, then erasing > everything ahead of time might speed things up. > > 2. Does using the full erase formatting option reduce the life of > the card materially?
The card controller can do a variety of different things, and you don't have much control about it. The general recomendations are: 1) Try different card makes and different vendors. 2) Use basic file system FAT16/FAT32 with clusters of maximum size. 3) Start with empty card to avoid fragmentation issues. The 1.3 MB/s is not much; this speed should be easily sustainable unless something is wrong with hardware or software. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On 25/02/2010 17:17, Peabody wrote:

> And for those interested, the definitive source on this camera is > here: > > http://www.chucklohr.com/808/ >
Can't offer much ideas on the preformatting of your cards, but if you look at reviews of class 6 cards there does seem to be some variation of actual speeds attainable. I'm investigating getting a Class 6 card for my MD80 clone (the 720x480 gumstick model). I've also got one of the car remote fob types in the post coming here. So will be messing about with installing it in the car, adapting power and changing the card size to SD. Thanks for the link. Very interesting; these things made of market failed mobile phone parts :-) -- Adrian C