Re: SD-MMC writing FAT



dalai lamah wrote:
Un bel giorno Rocky digitò:

The problem is that according to the SANDISK spec one can do sector
writes of 512 bytes, but that an erase will operate on 32 sectors. This
means that to update the directory or the FAT one needs to read out
16KB of data, do the erase, update the byte(s) in ram and write it all
back again. This 16K block won't fit in a PIC.

I don't remember if there is a specific MMC command to erase sectors,
anyway you don't need to erase a sector before writing it, you can just
overwrite it with the new data: the MMC controller will take care of all
the necessary operations (i.e. erasing a flash sector, rewriting the
unchanged blocks, etc) in a transparent way. You just have to be aware that
sometimes a sector write will take more time than the usual, because of all
these "hidden" operations.

Hi Antonio
Ok, so I did misunderstand what was meant. That would be why they go on
about it being more efficient if the data to be (over)written is the
size of an 'erase block'.
Thanks -- Rocky

.



Relevant Pages

  • RE: Interesting One
    ... Aside from a sector by sector wipe of the ... Basically in a nut shell when you erase a file from your drive all you ... John Crowley (Maidstone) Ltd may be monitored. ...
    (Security-Basics)
  • Re: SD-MMC writing FAT
    ... 16KB of data, do the erase, update the bytein ram and write it all ... I don't remember if there is a specific MMC command to erase sectors, ... anyway you don't need to erase a sector before writing it, ... the necessary operations (i.e. erasing a flash sector, ...
    (comp.arch.embedded)
  • Re: SD-MMC writing FAT
    ... The problem is that according to the SANDISK spec one can do sector ... 16KB of data, do the erase, update the bytein ram and write it all ...
    (comp.arch.embedded)
  • Re: Flashing nk.bin for SW Update
    ... In case of NAND Flash you can write one sector once. ... that sector you'll have to erase the complete block. ... image length you can get from the image header or if you are downloading ...
    (microsoft.public.windowsce.embedded)
  • Re: Filesystem for block devices using flash storage?
    ... Writes to magnetic disks are functionally atomic at the sector level. ... entire erase block, which could be up to 256k on some MLC flash. ... I can see a trend towards bigger erase blocks. ...
    (Linux-Kernel)