TI中文支持网
TI专业的中文技术问题搜集分享网站

nand flash的ECC: uncorrectable问题

大家好,

     我们参照了APPro DM8127的开发板设计,软件版本为DM8127_IPNC_3.80.00。在我们板中nand falsh 使用的是S34ML01G200TFI000,8位宽度。在u-boot中对nand falsh进行读写,擦除和写均正常,但是读的时候有“ECC: uncorrectable”,但是比较读出来的数据又是正常的,选择的是HW ECC BCH8。请问,问题出现是在哪里?

Eason Wang:

Hi,

试一下这个

/ drivers / mtd / nand / omap2.c

 

byte_pos  = (eccsize + eccbytes – 1) -981                                                 (err_loc[j] / 8);

改成

byte_pos = ((eccsize + eccbytes)*8 –error_loc[j] – 1)/8

anger0925:

回复 Eason Wang:

你好,

    / drivers / mtd / nand / omap2.c您说的这个是内核中的吧。我是在u-boot中对nand flash操作。在u-boot中\drivers\mtd\nand\ti81xx_nand.c中的ti81xx_fix_errors_bch()函数下有error_byte_pos = ((512 * 8) – (error_loc[count]) – 1) /8;有这一句。

kooking:

回复 anger0925:

在其它平台风过类似,如果u-boot驱动中类似的,可以直接注释掉:

int board_nand_init(struct nand_chip *nand)

{ …

* If we are 16 bit dev, our gpmc config tells us that */

//if ((readl(&gpmc_cfg->cs[cs].config1) & 0x3000) == 0x1000)

//nand->options |= NAND_BUSWIDTH_16;

… }

anger0925:

回复 kooking:

if ((readl(&gpmc_cfg->cs[cs].config1) & 0x3000) == 0x1000)

       nand->options |= NAND_BUSWIDTH_16;

这两句是读取模式,确定nand是8位还是16位宽度的,我的8位宽度的,我已经把nand->options |= NAND_BUSWIDTH_16;这一句屏蔽掉了的。

anger0925:

回复 anger0925:

比如我读取数据nand read 0x81000000 0x20000 0x40000,读出来的数据与原有数据是相同的。出现的错误信息:

ECC: uncorrectable.

NAND read from offset 20000 failed -74

262144 bytes read: ERROR

Eason Wang:

回复 anger0925:

有没有试过nand scrub后重烧uboot再测?

这个指令可以重做坏块表

anger0925:

回复 Eason Wang:

你好,

       nand scrub 这个命令我试过了,情况还是一样的.

赞(0)
未经允许不得转载:TI中文支持网 » nand flash的ECC: uncorrectable问题
分享到: 更多 (0)