开发者

C/C++-Library for EEPROM wear-leveling under Linux?

does anybody know of a library for storing data securely in an 8k-EEPROM, which is attached over the I2C-interface? I am especially intere开发者_JS百科sted in wear-leveling as I have a write-intensive application where the EEPROM should/must be used as a NVRAM for often-chaning measurement data.

Thanks in advance, Martin


The only wear levelling code I've ever come across is in the MTD drivers in the kernel - either in the old JFFS2 filesystem or in the UBI level. These are designed for much larger FLASH devices, with correspondingly larger block sizes (typically 64KB). However, you might get some idea from the code (e.g. see drivers/mtd/ubi/wl.c in the kernel tree).

Otherwise, for your measurement data, you'll probably just have to maintain a ring buffer, as large as you can, and write each measurement into consecutive locations, along with a timestamp so that you can later come along and locate the latest one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜