Wear leveling NOR flashes

Mar 05, 2008 2 Replies

Hello.



We have a Xscale based board with NOR flash storage. We are working on ways to detect and recover from file corruption and some questions were raised as a consequence of that:


1- Does JFFS2 do some kind of wear leveling?
2- If the answer to 1 above is yes, what is the basic algorithm? AFAIR one possible algorithm uses only free blocks for wear leveling; thus blocks that keep unmodified files (that is, files in FS that are only read) are left alone. Other possible algorithm uses every block for wear leveling and copies blocks from unmodified files to other blocks so that every block in the flash is evenly used in order to increase its lifespan.
3- If the answer to 1 is no, is some kind of wear leveling done at all?

I tried to figure out from documentation on MTD site but I couldn't.



Thank you very much in advance for any help.



Elder.



Hello.

We have a Xscale based board with NOR flash storage. We are working on ways to detect and recover from file corruption and some questions were raised as a consequence of that:

1- Does JFFS2 do some kind of wear leveling? 2- If the answer to 1 above is yes, what is the basic algorithm? AFAIR one possible algorithm uses only free blocks for wear leveling; thus blocks that keep unmodified files (that is, files in FS that are only read) are left alone. Other possible algorithm uses every block for wear leveling and copies blocks from unmodified files to other blocks so that every block in the flash is evenly used in order to increase its lifespan. 3- If the answer to 1 is no, is some kind of wear leveling done at all?

I tried to figure out from documentation on MTD site but I couldn't. I mean, it was not entirely clear which algorithm is used for WL.

Thank you very much in advance for any help.

Elder.

Yes. (But only for flash devices that can be accessed like a RAM (Address/Data) and don't do any internal wear leveling.) You need an MTD driver that JFFS2 can access the chip through.

No idea :) look at the source. :)

-Michael

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required