Rob Jansen wrote: > Bill W. wrote: > > >>It may make sense to align cluster size w/flash erase block size. > > > Indeed. > The 21xx flash memory has got some weird sector seizes. > The 213x series has 8 x 4kB, 14 x 32 kB and then 5 x 4kB (in that order) > and for the 212x it is even worse: 8 x 8kB, 2 x 64 kB and 7 x 8kB. > The 210x and 211x series use a sector size of 8kB for all their sectors. > > You can (as far as I know - never did this myself) perform partial > programming of a sector. The IAP functions as described in the 213x user > manual will allow you to write to Flash in 256/512/1024/4096 byte blocks > but you have to erase sectors on full sector sizes. This will definitely > not match your FAT file system. > > Samuel wrote: > > >>I need to basically do relative addressing when logging or >>calling the log file, any help will be appreciated > > > I'm not sure what you mean by "relative addressing"? > If it is just logging data you need to do the easiest way is to just use > reserve some sectors for logging and start using these without any > difficult file system. You could either create a directory which tells > you date/time/filename and the start position of the file in memory or > define a structure that defines what the block is about and what its > length is. > > Depending on the application and the amount of data I would opt for an > MMC/SD card for logging. Log the data on your application and then just > plug the SD card into a PC and a PC application will show your data. > I am going to use this for logging data and updating software (on boot > check for presence of SD card, check for new software and reprogram > flash if needed) > > See also http://groups.yahoo.com/group/lpc2000/message/9293 > > Regards, > > Rob > 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. If there are other reasons for using a file system, a flash file system like JFFS(2) could be better solution than FAT. Because it is balancing write/erase cycles to your flash other than FAT. Just have look to the Linux kernel (the greatest resource of open-source code in this world!). Check the uClinux resources and mailing list for a good (bug-free) implementation, too. Regards, 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/ ************************************************/
Message
Re: [lpc2000] Re: Adding Filesystem on LPC2138 or 2294
2005-10-10 by Sten
Attachments
- No local attachments were found for this message.