Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: Adding Filesystem on LPC2138 or 2294

2005-10-11 by Sten

Paul Curtis wrote:
> Hi, 
> 
> 
>>>Correct! If you want to log data continously only, why you want to 
>>>spent a lot of time in implementing a file system? Just write your 
>>>data byte4byte to your flash and wrap around if it is full.
>>
>>Definitely concur on this point. Using a file system just to 
>>do some append-only logging like using a chainsaw to cut butter.
> 
> 
> You can't write byte-by-byte to the LPC flash.  IIRC, an ECC byte cannot
> be changed without erasing the flash so you cannot over-program and
> already-programmed word.  Hence you must write in groups of four bytes
> aligned to a word boundary.  The other thing to say is that the IAP
> routines write a minimum of 256 bytes to a 256-byte-aligned page, so to
> synthesize word-wise writing you need a buffer of 256 bytes and a copy
> of the previous flash contents for the page.
> 

Due to the small sector sizes of LPC flashes it would be a good
compromise to simply erase a whole sector, write to this sector
block-by-block (not byte-by-byte :-) until this is sector is full. It is
possible to programm a block more than once if you keep in mind that
bits can only be erased. So you can modify a block byte-by-byte
continiously.
If you implement a methode "read sector to RAM, modify sector in RAM,
erase sector in ROM, programm sector from RAM to ROM" than you still
have a base implementation of a flash file system.

  Sten

-- 
/************************************************
 Do you need a tiny and efficient real time
 operating system (RTOS) with a preemtive
 multitasking for LPC2000 or AT91SAM7?

   http://nanortos.net-attack.de/

 Or some open-source tools and code for LPC2000?

   http://www.net-attack.de/

************************************************/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.