cancel
Showing results for 
Search instead for 
Did you mean: 

Overwriting data in SPI Flash

al-fayez-bs
Associate II
Posted on May 07, 2011 at 17:04

Overwriting data in SPI Flash

2 REPLIES 2
Posted on May 17, 2011 at 14:34

Yes, that's pretty much how most file systems work.

Some sectored SPI flash devices have one or two staging buffers (internal RAM or registers), which can be used to hold data and perform modification without pulling it all across to the CPU.

You might consider techniques like caching, lazy writes, and journaling, to mitigate unnecessary erase/write cycles.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
trevor23
Associate III
Posted on May 17, 2011 at 14:34

H Saf,

You can find/buy file systems that take care of all this. I developed a simple power failure resilient one that I use on several projects (simple in that file space is allocted at compile time). It has a standard fopen, fread, fwrite, fseek, fclose etc. type interface. Read only is possible with very little code which is good for bootloaders.  Let me know if you are interested as I might be able to licence to you. There are many other file systems that go further allowing dynamic allocation and wear levelling etc. etc. but can become quite complex.

Regards

Trevor