Re: SPI communication protocol for micro-sd
- From: didi <dp@xxxxxxxxxxx>
- Date: Mon, 1 Jun 2009 07:32:53 -0700 (PDT)
On May 28, 10:54 pm, Mark Borgerson <mborger...@xxxxxxxxxxx> wrote:
In article <3132d35e-4763-430f-95f0-
809623d02...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, zwsdot...@xxxxxxxxx says...> On May 28, 12:44 pm, Mark Borgerson <mborger...@xxxxxxxxxxx> wrote:
of 512 bytes to the SD can vary quite a bit---especially when
the card has to erase a new block of internal flash. If you're
Depending on how the filesystem works, the worst case (non-application-
optimized FS) is when ALL of the following need to happen in order to
write the next byte:
1) need to find next free cluster and it is not contiguous with
current cluster
2) need to update FAT chain for the file
3) need to erase the block containing the new cluster
I'm writing my file system to avoid #1 and #2. I think I can
handle #3 with about 32K of buffer space.
In earlier tests, #1 turned out to be a real killer---especially
near the end of an SD where the FAT may be a megabyte or
more. The problem doesn't have reasonable bounds if your're
looking for that one free cluster in the middle of
a 2G disk filled with other files.
Mark Borgerson
Sorry, my recent post went composed as a reply to the wrong
message, my mistake. Here it is again, quoting the message
I initially intended to quote.
----
This demonstrates the fundamental weakness of the FAT system.
While it was nearly perfect for a floppy disk of 1.44M (FAT12),
when it comes to gigabytes a FAT32 is just too large.
A filesystem which uses a bit per cluster for allocation purposes
is 32 times more efficient (at least on some processors, those
which have a "count leading 0s" opcode). For MS compatibility
purposes the remote system can be shown a FAT image, built
based on the more efficient internal filesystem image (this is
how I have been doing DPS <-> FAT for > 10 years).
Dimiter
------------------------------------------------------
Dimiter Popoff Transgalactic Instruments
http://www.tgi-sci.com
------------------------------------------------------
http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/
.
- Follow-Ups:
- Re: SPI communication protocol for micro-sd
- From: Hans-Bernhard Bröker
- Re: SPI communication protocol for micro-sd
- Prev by Date: Re: Intels chips in early days...Quire interesting...
- Next by Date: Standard data exchange format for power systems (inverters, battery, solar etc)?
- Previous by thread: Re: SPI communication protocol for micro-sd
- Next by thread: Re: SPI communication protocol for micro-sd
- Index(es):
Relevant Pages
|