This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

求助:关于dm8168使用4GB nand出现ECC:uncorrectable. NAND无法read的问题



HI:

       芯片是dm8168,原来采用的是官方EVM板上的256MB的nand flash ,产品需要,换了4GB的大flash,根据手册要求,选用MT29F32G08CBAAA这块芯片:

页大小和块大小都符合dm8168手册的要求。

      我用的环境是:ezsdk  5.05   (校验都是bch8)

      现在的问题是:

      1、我用spi启动u-boot;

       2、在u-boot界面下下载内核,烧写到nand flash  0X280000    对应位置上,都没有问题,命令如下:

       nand  erase 0x280000 0x300000;

      nand write 0x81000000 0x280000 0300000;

并且使用nand dump 0x280000 之后,里面的数据都和内存里面的是一样的。


     3、之后使用nand read 0x81000000 0x280000 0x300000出现如下错误:

ti8168_evm#nand read 0x81000000 0x280000 0x300000

NAND read: device 0 offset 0x280000, size 0x300000
Skipping bad block 0x00280000
Skipping bad block 0x00300000
Skipping bad block 0x00380000
Skipping bad block 0x00400000
Skipping bad block 0x00480000
Skipping bad block 0x00500000
Skipping bad block 0x00580000
Skipping bad block 0x00600000

       4、使用网络挂载的方式进入linux,用cat   /proc/mtd  查看flash分区,出现如下现象(mtd0-mtd3是nor flash的分区):

root@dm816x-evm:~# cat /proc/mtd 
dev: size erasesize name 
mtd0: 00010000 00008000 "U-Boot" 
mtd1: 00000000 00000000 "U-Boot Env" 
mtd2: 00010000 00008000 "Kernel" 
mtd3: 00000000 00000000 "File System" 
mtd4: 00000000 00000000 "U-Boot" 
mtd5: 00000000 00000000 "U-Boot Env" 
mtd6: 00000000 00000000 "Kernel" 
mtd7: 00000000 00000000 "File System" 
mtd8: 00000000 00000000 "Reserved"

如果是用官方那块256的nand,这里的打印信息都是正确的。



我查看了相关的帖子,发现都是ecc校验的问题,但是ezsdk 5.05这个版本的都是bch8校验方式,请问问题可能出在什么地方?内核也无法识别,是不是8168或者ezsdk这个版本不支持这么大的nand?

谢谢

BR






  • oob打印如下:

    00 ff e4 27 eb cf 53 b3
    ce c8 a1 92 cb cb c6 00
    c5 5e f5 99 5a 88 1e 52
    7c 77 d0 ab ad 00 87 1b
    6e e1 5d 4a 20 5a 19 15
    c5 5f b1 00 af 49 ad eb
    df 18 fe a1 55 ec ab 3d
    23 00 ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff

  • 你可用http://support.spectrumdigital.com/boards/evm816x/reve/  

    http://support.spectrumdigital.com/boards/evm816x/reve/files/evm816x_BSL.zip

    这里下到基于CCS和仿真器的测试工程对Nand进行读写测试看看。。。

  • Hi Eason Wang:

               感谢在周末的晚上还给我回复,在ti81xx_write_page_bch()这个函数被调用的时候,chip->oob_poi[0]被置为了00,导致写入oob区域后被标记成了坏块,我在前面认为设定了chip->oob_poi[0] = 0xff,现在在u-boot下可以正常读写,不知道这样有没有风险?

               现在新的问题是我在内核代码中看到如下注释(mtd/nand/davinci_nand.c):

    /* 4KiB page chips are not yet supported. The eccpos from
    * nand_ecclayout cannot hold 80 bytes and change to eccpos[]
    * breaks userspace ioctl interface with mtd-utils. Once we
    * resolve this issue, NAND_ECC_HW_OOB_FIRST mode can be used
    * for the 4KiB page chips.
    *
    * TODO: Note that nand_ecclayout has now been expanded and can
    * hold plenty of OOB entries.
    */

    ::::内核版本:linux-2.6.37-psp04.04.00.01/;

    这是说ezsdk5.05这个版本的内核不支持4k也大小的flash吗?

    我现在的是在u-boot阶段nand都可以使用,但是启动内核会有如下报错:

    map2-nand driver initializing
    ONFI flash detected
    ONFI param page 0 valid
    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd7 (Micron NAND 4GiB 3,3V 8-bit)
    Creating 5 MTD partitions on "omap2-nand.0":
    0x000000000000-0x000000200000 : "U-Boot"
    mtd: partition "U-Boot" is out of reach -- disabled
    0x000000000000-0x000000080000 : "U-Boot Env"
    mtd: partition "U-Boot Env" is out of reach -- disabled
    0x000000000000-0x000000400000 : "Kernel"
    mtd: partition "Kernel" is out of reach -- disabled
    0x000000000000-0x000004000000 : "File System"
    mtd: partition "File System" is out of reach -- disabled
    0x000000000000-0x000000000000 : "ubifs"
    mtd: partition "ubifs" is out of reach -- disabled

    我修改了对应的区域大小并且block size也改为了512k,但是还是会报这个错误,请问这是什么原因,内核不支持吗?

    再次感谢!

    工作愉快!

    BR


  • 你好,请问是直接使用原版的256MB的nand的uboot么,我现在更换了三星的X8的4GB的nand,UBOOT不能识别,显示的是No NAND Device found,也是4096,device ID=0XD7