npuazm
发表于 2011-08-17 13:55
mark
jljerryliu
发表于 2011-08-17 17:46
/*
*omap_calculate_ecc - Generate non-inverted ECC bytes.
*
*Using noninverted ECC can be considered ugly since writing a blank
*page ie. padding will clear the ECC bytes. This is no problem as
*long nobody is trying to write data on the seemingly unused page.
*Reading an erased page will produce an ECC mismatch between
*generated and read ECC bytes that has to be dealt with separately.
*@mtd: MTD structure
*@dat: unused
*@ecc_code: ecc_code buffer
*/
这是我的omap3630 u-boot中的一个函数的注释;
估计一般使用的都是 inverted ECC ,所以后面几个要取反吧?
期待高手帮忙解释下:
daniel_kohler
发表于 2011-08-17 20:12
本帖最后由 daniel_kohler 于 2011-08-17 20:13 编辑
回复 1# wwxbei
非常感谢,根据这个思路,我准备做一个效率更高的算法。还有个疑问,正在使用Flash空间怎么检测呢?
zdhxiaoma
发表于 2011-09-24 09:22
已经保存学习,非常感谢!
beesui
发表于 2012-02-07 17:31
收藏了,感谢楼主的解析
clean_water520
发表于 2012-02-10 09:21
:victory:不错不错,值得很好的去研究下~~~
sudolee
发表于 2012-11-29 10:10
前辈,为什么最后要“取反”呢?
wen_kernel
发表于 2014-01-22 15:53
很多nand flash控制器有自己的ECC模块,Hamming code, BCH4, BCH8, BCH16.
楼主的文章很好。
asine315
发表于 2014-09-15 14:41
回复 1# wwxbei
wwxbei你好,在你的帖子里可以看出,256B的数据,需要22bit的ECC校验,可是通过百度百科,1B的数据需要5bit的校验位,数据每翻倍,校验位多1位,这样推算,256B的数据并不需要22bit这么多的校验位,能不能麻烦您指教一下其中的道理呢?多谢!
2015AND34
发表于 2015-05-29 15:29
本帖最后由 2015AND34 于 2015-05-29 17:33 编辑
马克瑞