Re: SD-MMC writing FAT
- From: "Rocky" <RobertGush@xxxxxxxxx>
- Date: 30 Dec 2006 05:43:29 -0800
Jonathan Kirwan wrote:
On 30 Dec 2006 04:53:44 -0800, "Rocky" <RobertGush@xxxxxxxxx> wrote:Hi Jon,
I am starting some work that would be using an SD card (in MMC-SPI
mode) and I was hoping to use a PIC or similar low memory chip.
The idea was to use Lewin Edward's DOSFS (www.zws.com) as it only
requires about 1KB RAM.
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.
Have I misunderstood the requirements relating to SD / MMC for updating
a sector?
Rocky, I know nothing about the sandisk spec and haven't examined
Lewin's code but have you considered the possibility of leaving always
at least one (or a few) 32-sector region(s) empty? That seems that it
may permit you to transfer a directory under modification without
having to keep an entire 16k block in ram.
That crossed my mind, but it did seem to be clumsy. Also I was hoping
to keep the SD readable by a PC at all times.
Antonio (in another post) suggests that I was wrong in my assumption
and the card handles all of the erase / write transparently.
--Rocky
.
- References:
- SD-MMC writing FAT
- From: Rocky
- Re: SD-MMC writing FAT
- From: Jonathan Kirwan
- SD-MMC writing FAT
- Prev by Date: Re: SD-MMC writing FAT
- Next by Date: Re: Worst case execution time problem
- Previous by thread: Re: SD-MMC writing FAT
- Next by thread: Re: SD-MMC writing FAT
- Index(es):
Relevant Pages
|