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

Nand flash “ECC: uncorrectable.” Issue

hello,        

         There is a Nand flash “ECC: uncorrectable.” Issue when I boot from nand flash. Now I can boot the u-boot and linux kernel from SD card, and when I try to boot from nand flash after I write all these images into flash, I  encounter this issue, so please help me for this question, thanks in advance!

         I attach some messages for your reference. By the way, I am using the default configuration same as AM335X SK board.

         by the way, if I dump(use nand dump in u-boot) the data from nand flash that I have written them into flash, the data is same as that I have written. but if I try to read(use nand read in u-boot), there is “ECC: uncorrectable.” Issue.

#define PISMO1_NAND_SIZE GPMC_SIZE_128M//GPMC_SIZE_256M

i am using the following configuration(in am335x_evm.h):

#define GPMC_NAND_ECC_LP_x8_LAYOUT 1

#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
CONFIG_SYS_NAND_PAGE_SIZE)
#define CONFIG_SYS_NAND_PAGE_SIZE 2048
#define CONFIG_SYS_NAND_OOBSIZE 64
#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
#define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
10, 11, 12, 13, 14, 15, 16, 17, \
18, 19, 20, 21, 22, 23, 24, 25, \
26, 27, 28, 29, 30, 31, 32, 33, \
34, 35, 36, 37, 38, 39, 40, 41, \
42, 43, 44, 45, 46, 47, 48, 49, \
50, 51, 52, 53, 54, 55, 56, 57, }

#define CONFIG_SYS_NAND_ECCSIZE 512
#define CONFIG_SYS_NAND_ECCBYTES 14

#define CONFIG_SYS_NAND_ECCSTEPS 4
#define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * \
CONFIG_SYS_NAND_ECCSTEPS)

#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE

Yaoming Qin:

郑工,您好

  在这里,用中文就好了,可以更直接方便:)

  请问您在写image到nand里面的时候设了ecc吗,可以参考下面几个文档

   http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide

  http://processors.wiki.ti.com/index.php/AM335x_NAND_Driver%27s_Guide

 http://processors.wiki.ti.com/index.php/Davinci/Sitara/Integra_Nand_Boot_FAQ

yu zheng:

回复 Yaoming Qin:

Hi yaoming,

这些文档我参考过的;

现在的情况是,我使用nand write写完MLO到nand里面,然后dump出来(立刻dump和关机重启之后进入U-boot去dump出来),发现是和写进去的数据是一致的;但是使用Nand read去读的时候提示“ECC: uncorrectable.” ;如果从nand启动在load u-boot时也是提示“ECC: uncorrectable.”;我在am335x_spl_bch.c的nand_read_page中,把读取到的数据打印出来,发现和原始数据不一样;

所以不知道问题出在了哪里?

yu zheng:

回复 yu zheng:

我在U-boot里面把MLO写到flash中,然后使用nand dump打印出来,数据都是正确的;但是使用nand read把数据读取并打印出来,发现每个page的第一个byte是错的,其余的数据都是正确的;请问是什么原因导致的这种情况,谢谢!

Yaoming Qin:

回复 yu zheng:

郑工,

  请查看  http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/187883.aspx

  看上去还是BCH的问题,请问您用的ezsdk是哪个版本

yu zheng:

回复 Yaoming Qin:

Hi Yaoming,

      thanks for your reply, I am using ti-sdk-am335x-evm-06.00.00.00-Linux-x86-Install.

目前我debug的情况是,在u-boot下面把MLO和u-boot写入flash,然后使用nand dump打印出来部分数据,通过对比,发现都是正确的;

但是使用nand read读取时提示“ECC: uncorrectable.” ,我把读取到的数据打印出来,发现第一个byte是错误的,从第二个byte开始的数据,和原始数据是一致的;

在通过NAND flash启动时发现,在执行到nand_spl_load_image之后,开始提示ECC: uncorrectable.,也就是说在从nand flash load u-boot时出错了;我把load出来的数据打印出来,发现和前面的错误一样:第一个byte是错误的,从第二个byte开始的数据,和原始数据是一致的;

从现象上看是nand read时出错了,但真正的原因还是没弄清楚。

yu zheng:

回复 yu zheng:

我把相关的配置都贴了出来(未贴出的配置是和SDK中的default配置一致),所以也请先帮忙check一下配置是否正确,是否有漏掉的配置?谢谢

我们目前使用的flash是MX30LF1G08AA-XKI,和3358EVM板子上的flash不太一样;主要有

MX30LF1G08AA-XKI是128MB,而EVM board上镁光flash是256MB的;

Yaoming Qin:

回复 yu zheng:

关于flash不一样大,请查看  u-boot-am33x/arch/arm/include/asm/arch-ti81xx/mem.h 中的定义

yu zheng:

回复 Yaoming Qin:

6.0SDK中没有u-boot-am33x/arch/arm/include/asm/arch-ti81xx/mem.h

我在ti-sdk-am335x-evm-06.00.00.00\board-support\u-boot-2013.01.01-psp06.00.00.00\arch\arm\include\asm\arch-am33xx\mem.h

已经做了配置,请见本帖的最前部,我已经贴了出来!

Yaoming Qin:

回复 yu zheng:

从配置看,我暂时没发现什么问题

1. 请您贴一下 nand read和nan dump的具体命令

2. 请您把uboot的参数存一下,然后重启板子的时候,再看看这些参数是否还有效。

yu zheng:

回复 Yaoming Qin:

命令在附件里面也有的,也可以参考下面的:

mmc rescanmw.b 0x82000000 0xFF 0x20000fatload mmc 0 0x82000000 MLOnand erase 0x0 0x20000nand write.i 0x82000000 0x0 0x20000

mmc rescan mw.b 0x82000000 0xFF 0x80000fatload mmc 0 0x82000000 u-boot.imgnand erase 0x80000 0x80000nand write.i 0x82000000 0x80000 0x80000

mmc rescan mw.b 0x82000000 0xFF 0x500000fatload mmc 0 0x82000000 uImagenand erase 0x280000 0x500000nand write.i 0x82000000 0x280000 0x500000

nand dump 0x0nand dump 0x80000

nand read.i 0x82000000 0x00 0x800nand read.i 0x82000000 0x80000 0x800

赞(0)
未经允许不得转载:TI中文支持网 » Nand flash “ECC: uncorrectable.” Issue
分享到: 更多 (0)