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.

DM365: Error in JFFS2 file system

Hi,

I'm encountering some problems when flashing a jffs2 filesystem image file to my DM365 EVM. It seems that the flashed image is correct, but any change to the file system then cause ECC errors. I'm using mtd-utils included with PSP 2.10.00.14 (mtd-utils-v1.1-lsp200). Please try this:

On the host system, create a new test directory and a test file on it. Then create a jffs2 file system image using the "mkfs.jffs2" program:

host: mkdir test
host: echo testcontent > test/testfile
host: mkfs.jffs2 -e 0x20000 -p -l -s 0x800 -n -d ./test -o testfs.jffs2

Then on the EVM board I mount an nfs partition containing the image file (i'll skip this part of the commands), then write the image to flash. If I mount the mtd partition, there are no errors. When I modify the file system (adding a new file), then ECC errors are shown when remounting it.

The following commands will write the image file to mtd6, please choose an mtd device suitable for your board:

EVM: flash_eraseall -j /dev/mtd6
EVM: nandwrite -p /dev/mtd6 /mnt/nfs/testfs.jffs2

Now I'll mount the new file system and check the content of the file added in the first step. No errors will be issued:

EVM: mount -t jffs2 /dev/mtdblock6 /mnt/point
EVM: cat /mnt/point/testfile

Then I add a new file, still no errors:

EVM: echo newtestcontent > /mnt/point/newtestfile
EVM: cat /mnt/point/newtestfile
EVM: umount /mnt/point

Now if I remount the file system, ECC errors are issued:

EVM: mount -t jffs2 /dev/mtdblock6 /mnt/point

nand_davinci_4bit_compare_ecc Too many errors to be corrected!
mtd->read(0x1fc00 bytes from 0x400) returned ECC error
Empty flash at 0x00000080 ends at 0x00000800
nand_davinci_4bit_compare_ecc Too many errors to be corrected!
mtd->read(0x7bc bytes from 0x844) returned ECC error
nand_davinci_4bit_compare_ecc Too many errors to be corrected!
mtd->read(0x788 bytes from 0x878) returned ECC error

 

Can you please check if this happens on your board too? Is this a bug in the supplied mtd utils or the kernel mtd driver?

  • This is what I tried

    1) used ramdisk.gz  found under mv_pro5/montavista/pro/devkit/arm/v5t_le/images to create a tar ball

          host% gunzip ramdisk.gz

          host%  mkdir ram

          host% mount ramdisk ram -o loop

          host% tar czf ../rootfs.tar.gz *    (inside ram directory when I did this)

    2) on EVM

         % mkdir /mnt/filesys1

          % flash_eraseall -j /dev/mtd3

         % mount -t jffs2 /dev/mtdblock3 /mnt/filesys1

         % tar -zvxf /opt/dvsdk/dm365/rootfs.tar.gz   ( note that this is same tar.gz file produced in host)

    then I could mount and umout mdt3 jffs2 partition many times, creating directories and files in between and did not get any errors.

     

  • Hi Juan,

    yes this method works, I've not seen any errors with it. Still, it's not exactly the same procedure. It is slower and it requires more memory, in particular if the tar contains a lot of small files. What's strange is that flash_eraseall, nandwrite, mkfs.jffs2 have been supplied with the PSP and should have been tested with the Kernel. I think that it is worth investigating if there is some problem in the MTD/NAND device driver and/or the MTD utilities. Also advertising that mtd-utils do not work as expected is a good thing, if the problem is confirmed. What do you think?

    Thanks again!

     

  • Hi,

    just for discussion's completeness, I've logged the time required for a nandwrite, and mount/untar methods (unsing uncompressed and compressed tars):

    time nandwrite -m -p /dev/mtd6 /mnt/nfs/rootfs.arm.jffs2
    real    0m 3.13s
    user    0m 0.02s
    sys     0m 2.85s

    time tar -x -C /mnt/point -f /mnt/nfs/rootfs.arm.tar
    real    0m 26.65s
    user    0m 0.30s
    sys     0m 24.86s

    time tar -x -C /mnt/point -f /mnt/nfs/rootfs.arm.tar.gz
    real    0m 34.93s
    user    0m 0.22s
    sys     0m 26.22s

    time tar -x -C /mnt/point -f /mnt/nfs/rootfs.arm.tar.bz2
    real    1m 7.56s
    user    0m 0.32s
    sys     0m 39.15s

    3 seconds vs 26 seconds is a noticeable difference, even if 26 seconds is not an unbearable wait.

     

  • Continuing the tests, I've discovered something stranger.

    First I've created a jffs2 file system with only one file in. This produced a very small image (less than 1 page in size). Flashed it with nandwrite, mounted it without problems. Then I've added a small file. This caused another page of the flash to be used. I've dumped the page to a file (offset 0x800, length 0x800). Then I've umounted the file system and remounted it. Again the ECC errors are issued.

    Now I've unmounted the filesystem again and dumped the pages 0 (old file) and 1 (new file) to disk. Erased the entire flash, and rewrited (with nandwrite) the same 2 pages getting them from the dump. The results are incongruent: the ECC part of page 0 (the one created by adding a file to the file system) is actually different! This should not be the case, since ECC should be calculated depending on the page content and this has not changed.

    Mounting the file system obtained this way made all the errors disappear.

    It is like if nandwrite and jffs2 do not agree on the ECC format, and nandwrite generates the "correct" one. Instead when the ECC is generated by jffs2, it is uncorrect.

     

    Here follows the data, just for reference:

    page 0, generated by mkfs.jffs2 and written with nandwrite

    0x00000000: 85 19 01 e0 30 00 00 00 78 be 3e fa 01 00 00 00
    0x00000010: 00 00 00 00 02 00 00 00 b5 53 cc 4a 08 08 00 00
    0x00000020: 40 69 b9 ba 44 2c ab dd 74 65 73 74 66 69 6c 65
    0x00000030: 85 19 02 e0 50 00 00 00 d5 3b 8c 47 02 00 00 00
    0x00000040: 01 00 00 00 b4 81 00 00 f4 01 f4 01 0c 00 00 00
    0x00000050: b5 53 cc 4a b5 53 cc 4a b5 53 cc 4a 00 00 00 00
    0x00000060: 0c 00 00 00 0c 00 00 00 00 00 00 00 35 2b ff 4e
    0x00000070: d4 a1 6d c6 74 65 73 74 63 6f 6e 74 65 6e 74 0a
    0x00000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000000a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000000b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000000c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000000d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000000e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000000f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000110: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000120: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000130: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000140: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000150: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000160: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000170: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000190: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000001a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000001b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000001c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000001d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000001e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000001f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000210: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000220: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000230: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000240: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000250: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000260: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000270: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000290: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000002a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000002b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000002c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000002d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000002e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000002f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000310: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000320: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000330: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000340: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000350: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000360: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000370: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000390: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000003a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000003b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000003c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000003d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000003e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000003f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000410: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000420: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000430: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000440: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000450: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000460: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000470: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000490: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000004a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000004b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000004c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000004d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000004e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000004f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000510: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000520: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000530: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000540: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000550: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000560: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000570: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000590: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000005a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000005b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000005c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000005d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000005e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000005f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000610: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000620: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000630: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000640: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000650: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000660: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000670: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000690: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000006a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000006b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000006c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000006d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000006e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000006f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000710: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000720: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000730: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000740: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000750: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000760: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000770: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000790: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000007a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000007b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000007c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000007d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000007e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000007f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
      OOB Data: ff ff ff ff ff ff f4 09 fc 84 b2 c2 8e a6 ae ef
      OOB Data: ff ff ff ff ff ff 3f 27 56 f5 29 d8 61 d9 9d 14
      OOB Data: ff ff ff ff ff ff 3f 27 56 f5 29 d8 61 d9 9d 14
      OOB Data: ff ff ff ff ff ff 3f 27 56 f5 29 d8 61 d9 9d 14

     

     

    page 1, generated by adding a file to the mounted file system:


    0x00000800: 85 19 02 e0 44 00 00 00 1d fb f7 98 03 00 00 00
    0x00000810: 01 00 00 00 a4 81 00 00 00 00 00 00 00 00 00 00
    0x00000820: fa 35 6e 38 fa 35 6e 38 fa 35 6e 38 00 00 00 00
    0x00000830: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000840: f9 cc cf 00 85 19 01 e0 31 00 00 00 1d d9 82 42
    0x00000850: 01 00 00 00 01 00 00 00 03 00 00 00 fa 35 6e 38
    0x00000860: 09 08 00 00 0f 79 d5 f8 25 7f bb b9 74 65 73 74
    0x00000870: 66 69 6c 65 32 ff ff ff 85 19 02 e0 4a 00 00 00
    0x00000880: 2e 8c 28 78 03 00 00 00 02 00 00 00 a4 81 00 00
    0x00000890: 00 00 00 00 06 00 00 00 fa 35 6e 38 fa 35 6e 38
    0x000008a0: fa 35 6e 38 00 00 00 00 06 00 00 00 06 00 00 00
    0x000008b0: 00 00 00 00 fc 13 bf b9 07 3f aa 1e 63 69 70 70
    0x000008c0: 61 0a ff ff 85 19 04 20 3c 07 00 00 2d 6e 7f 0c
    0x000008d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000008e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000008f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000910: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000920: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000930: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000940: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000950: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000970: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000990: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000009a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000009b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000009c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000009d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000009e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000009f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000aa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ab0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ac0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ad0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ae0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000af0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ba0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000bb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000bc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000bd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000be0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000bf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000cb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000cc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000cd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ce0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000cf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000da0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000db0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000dc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000dd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000df0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000eb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ec0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ef0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000fa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      OOB Data: ff ff ff ff ff ff 28 25 12 71 00 80 41 c9 89 10
      OOB Data: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00
      OOB Data: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00
      OOB Data: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00

     

    Page 0, rewritten from the dump after flash erase. Notice ECC is the same as before

    0x00000000: 85 19 01 e0 30 00 00 00 78 be 3e fa 01 00 00 00
    0x00000010: 00 00 00 00 02 00 00 00 b5 53 cc 4a 08 08 00 00
    0x00000020: 40 69 b9 ba 44 2c ab dd 74 65 73 74 66 69 6c 65
    0x00000030: 85 19 02 e0 50 00 00 00 d5 3b 8c 47 02 00 00 00
    0x00000040: 01 00 00 00 b4 81 00 00 f4 01 f4 01 0c 00 00 00
    0x00000050: b5 53 cc 4a b5 53 cc 4a b5 53 cc 4a 00 00 00 00
    0x00000060: 0c 00 00 00 0c 00 00 00 00 00 00 00 35 2b ff 4e
    0x00000070: d4 a1 6d c6 74 65 73 74 63 6f 6e 74 65 6e 74 0a
    0x00000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000000a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000000b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000000c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000000d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000000e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000000f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000110: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000120: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000130: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000140: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000150: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000160: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000170: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000190: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000001a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000001b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000001c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000001d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000001e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000001f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000210: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000220: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000230: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000240: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000250: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000260: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000270: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000290: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000002a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000002b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000002c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000002d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000002e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000002f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000310: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000320: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000330: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000340: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000350: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000360: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000370: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000390: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000003a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000003b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000003c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000003d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000003e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000003f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000410: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000420: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000430: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000440: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000450: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000460: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000470: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000490: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000004a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000004b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000004c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000004d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000004e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000004f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000510: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000520: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000530: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000540: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000550: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000560: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000570: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000590: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000005a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000005b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000005c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000005d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000005e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000005f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000610: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000620: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000630: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000640: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000650: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000660: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000670: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000690: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000006a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000006b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000006c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000006d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000006e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000006f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000710: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000720: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000730: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000740: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000750: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000760: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000770: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x00000790: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000007a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000007b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000007c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000007d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000007e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    0x000007f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
      OOB Data: ff ff ff ff ff ff f4 09 fc 84 b2 c2 8e a6 ae ef
      OOB Data: ff ff ff ff ff ff 3f 27 56 f5 29 d8 61 d9 9d 14
      OOB Data: ff ff ff ff ff ff 3f 27 56 f5 29 d8 61 d9 9d 14
      OOB Data: ff ff ff ff ff ff 3f 27 56 f5 29 d8 61 d9 9d 14

    Page 1, rewritten from the dump. The content is the same but ECC is DIFFERENT!

    0x00000800: 85 19 02 e0 44 00 00 00 1d fb f7 98 03 00 00 00
    0x00000810: 01 00 00 00 a4 81 00 00 00 00 00 00 00 00 00 00
    0x00000820: fa 35 6e 38 fa 35 6e 38 fa 35 6e 38 00 00 00 00
    0x00000830: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000840: f9 cc cf 00 85 19 01 e0 31 00 00 00 1d d9 82 42
    0x00000850: 01 00 00 00 01 00 00 00 03 00 00 00 fa 35 6e 38
    0x00000860: 09 08 00 00 0f 79 d5 f8 25 7f bb b9 74 65 73 74
    0x00000870: 66 69 6c 65 32 ff ff ff 85 19 02 e0 4a 00 00 00
    0x00000880: 2e 8c 28 78 03 00 00 00 02 00 00 00 a4 81 00 00
    0x00000890: 00 00 00 00 06 00 00 00 fa 35 6e 38 fa 35 6e 38
    0x000008a0: fa 35 6e 38 00 00 00 00 06 00 00 00 06 00 00 00
    0x000008b0: 00 00 00 00 fc 13 bf b9 07 3f aa 1e 63 69 70 70
    0x000008c0: 61 0a ff ff 85 19 04 20 3c 07 00 00 2d 6e 7f 0c
    0x000008d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000008e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000008f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000910: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000920: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000930: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000940: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000950: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000970: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000990: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000009a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000009b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000009c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000009d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000009e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x000009f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000a90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000aa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ab0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ac0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ad0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ae0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000af0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000b90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ba0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000bb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000bc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000bd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000be0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000bf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000c90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000cb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000cc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000cd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ce0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000cf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000da0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000db0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000dc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000dd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000df0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000e90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000eb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ec0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ef0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000f90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000fa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x00000ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      OOB Data: ff ff ff ff ff ff e8 75 3a 71 84 85 55 cd a9 1a
      OOB Data: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00
      OOB Data: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00
      OOB Data: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00

     

    Compare the OOB area of page 1, written by jffs2 and nandwrite:

    JFFS2:

      OOB Data: ff ff ff ff ff ff 28 25 12 71 00 80 41 c9 89 10
      OOB Data: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00
      OOB Data: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00
      OOB Data: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00

    NANDWRITE:

      OOB Data: ff ff ff ff ff ff e8 75 3a 71 84 85 55 cd a9 1a
      OOB Data: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00
      OOB Data: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00
      OOB Data: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00

     

  • I do agree with you that this needs to be investigated and have asked our internal software team to investigate.  My previous post was meant to provide a way to move forward in case you were stuck.  Thank you for your understanding and excellent contributions to our community.

  • Hi Juan,

    thanks a lot for your help. It is very important for me to understand how safe is the nand ECC support and if JFFS2 is the best filesystem to use. I've also noticed that the procedure I used to write the JFFS2 image file to nand is also suggested on TI's wiki, here:

    http://tiexpressdsp.com/index.php/Put_JFFS2_Image_to_Flash

    As a last note, the same problem happens when writing the JFFS2 image file through PSP's "nandwrite" utility (modified to  write the JFFS2 image).

    I'll test if the same problem happens when using U-Boot to write the image.

    If this is true, it seems that the linux kernel jffs2 file system is inconsistent in its ECC management with other methods that access the nand directly (either using JTAG outside of linux or MTD devices in linux).

     

  • Marco,

    Here is an update I got from one of our internal teams

     

    "JFFS2 will use the NAND OOB area for its information, so there could be differences between nandwrite and writing files after mounting it as a JFFS2 filesystem.

    We have seen such ECC errors with some of the NAND chips. There is a delay in the NAND driver called chip_delay. I believe increasing this delay to 100msfrom 20ms has helped to resolve these issues."

     

    I am trying to see if we have a list of NAND chips for which ECC errors are not seen.

  • Hi Juan,

    thank you for your prompt reply. I'll manually patch the driver and let you know if it solves the problem. I agree that JFFS2 modifies OOB area, but should not touch the bytes used by ECC. Moreover I am not 100% sure but I think that on NAND flashes, JFFS2 only uses OOB for cleanmarkers and nothing else. Again, I am not 100% sure but I think ECC only depends on page content and not OOB data itself, so if the page date is the same ECC should be the same.

    But I can be wrong... I'll try to play with chip_delay and let you know if it solves the problems.

    Thanks!

  • Hi, I've checked the drivers and I think you refer to this:

    static int __devinit nand_davinci_probe(struct device *dev)

    ...

    this->chip_delay = 25;

    ...

     

    static int nand_davinci_4bit_compare_ecc(struct mtd_info *mtd,
                         uint8_t *read_ecc, /* read from NAND */
                         uint8_t *page_data)

    ...

            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
    #ifdef CONFIG_ARCH_DAVINCI_DM365
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
    //added more here for DM365 with 4K NAND
    #ifdef CONFIG_DAVINCI_NAND_256KB_BLOCKS
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
            udelay(this->chip_delay);
    #endif
    #endif

    ...

     

    This is not the best code in the world, but I think that if I change chip_delay from 25 to 50 all the total wait should double. Notice that on DM365 the total wait is already 25 * 14 calls of udelay.

     

  • to be honest, personally I am not sure if this will make much difference, but I wanted to include as much information as possible in my previous response.. so I opted to leave this information in.  More important than perhaps finding a udelay setting that may work (hopefully all the time), I would like to understand the why behind it.  How does this process work and why do some NAND devices work and other do not?  Not sure if I can get all the answers, but I can at least try.

  • Thanks, I'll investigate this. First of all I'll try again to write the same data in a page using JFFS2 and nandwrite and check the ECC again. Then I'll try to find which one is correct. The problem is that I am looking for a document that describes how the NAND controller works but I've found none. I think ECC on DM365 is generated by hardware, but I've not found the related datasheet. Perhaps you can help.

     

  • Quick note: tried with chip_delay=50 instead of 25, same errors.

     

  • Hi Marco & Juan, has there been any resolution to this issue? I am starting to look at flash filesystems also, and I am seeing the same errors when using JFFS2, that is "nand_davinci_4bit_compare_ecc Too many errors to be corrected!" after modification and remounting of partition.

    Regards,

    -Craig

  • Hi,

    is there any update on this issue?

    Thanks!

  • Marco, Craig,

    Did you guys get some resolution on this issue?

    Regards,

    Anshuman

  • No news from me. I've not had the time to investigate further. Basically the problem is that if a JFFS2 fs is created from scratch by mounting an erased flash partition, it works. If instead the JFFS2 is created using nandwrite and an image file, it works when readonly, but starts to give problems when you mount it rw.

    I think there is an incompatibility in the OOB data created by nandwrite and the kernel JFFS2.

    At the moment I'm using a RO file system writen using an image and a JFFS2 created on the fly at first boot.

     

  • Marco,

    Thanks for sharing the information. I am actually struggling in a test which has nothing to do with filesystem. In my test i am doing a nandwrite and followed by nandread and seeing Too Many ECC errors. Do you have some clue from past experience, what might be causing it? I am anyways trying to check it through TI internal resources.

    flash_eraseall /dev/mtd7
    nandwrite -s 0 -p /dev/mtd7 random.test
    nanddump -f randomRead.test -l 57147392 -o -b -s 0 /dev/mtd7
    cmp randomRead.test random.test
    if [ $? -eq 0 ]
    then
      echo "Compare Ok"
    else
      echo "Compare Error"
    fi

     

    Regards,

    Anshuman

  • Hi

    We also see the problems with nandwrites of  image files. We use yaffs instead of jffs, but otherwise the symptoms are exactly the same. Mounting an empty partition, then untar files, works without problems. But using nanddump/nandwrite to clone the file system leads to the above described ecc error messages.

    Let me first summarize my experience with NAND on DM355. First, I had to introduce a delay in drivers/mtd/nand/nand_base.c. Otherwise the reads from the NAND were always preceded with two junk bytes. That led to wrong reads during kernel start (BBT was not detected) and erroneous results of nanddump, too. I don't know why this is not necessary on the EVM. On our hardware design we use nearly the same NAND device from micron (MT29F2G08), layout is of course a bit different.

     

    ===================================================================
    --- drivers/mtd/nand/nand_base.c        (Revision 16)
    +++ drivers/mtd/nand/nand_base.c        (Revision 166)
    @@ -628,6 +628,7 @@
                    return;

            case NAND_CMD_READ0:
    +               udelay(chip->chip_delay);
                    chip->cmd_ctrl(mtd, NAND_CMD_READSTART,
                                   NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE);
                    chip->cmd_ctrl(mtd, NAND_CMD_NONE,

     

     

    Second, this link suggests to use software ECC instead of hardware ECC to be able to use yaffs. This was true for us, too. But TI provides now patches that make yaffs work with hardware ecc (see this link, that provides this patch set). The advantage of using hardware ecc is, that U-Boot and kernel agree on the flash layout and recognize the bad blocks of each other.

    My solution to the problem as now is, to flash the image with U-Boot. I created a command "nand yaffs_write" there, that does exactly nothing with regard to ecc , but only writes the image (data and oob) raw to the flash. This code just checks, if there is a bad block and skips it in case. I finally check, if the image contained something different than 0xff in its last block (that could not be written as the partition size shrunk by one block), as this would mean I dropped some important data.

    I now want to copy this code into the kernel and so create my own code path for just using my own "nandrawwrite". But it would be of course much nicer to solve the underlying problem, so everybody profits from working tools.

    There might be an additional problem with the mtd-utils, as somebody presented a patch here, that solves this problem. I today tried the git-version of the mtd-utils that already incorporates this patch, but the ecc errors are still there, so the problem is most probably not (only) inside the mtd-utils.

    My last attempt was to merge the newest git-yaffs-code. But even this did not change the results. Did anybody try to backport the newest mtd-code in the kernel, too?

    Best regards

    Siegbert

  • hi

     

    i found below

     

    problme is paddding option. (i'll trace this isue continue)

    if you del -p option.  it's work

    (example :  sudo mkfs.jffs2 -d rootfs -l  --no-cleanmarkers  --pagesize=2048  -e 0x20000  -o rootfs.jffs2

    nandwrite -p /dev/mtdbloc4 rootfs.jffs2

    or

    sudo mkfs.jffs2 -d rootfs -l  --no-cleanmarkers  --pad=2048 --pagesize=2048  -e 0x20000  -o rootfs.jffs2

    nandwrite /dev/mtdbloc4 rootfs.jffs2)

    If 0xFF write by nandwrite & kernel.

    OOB Data is invalid like here

      OOB Data: ff ff ff ff ff ff 3f 27 56 f5 29 d8 61 d9 9d 14
      OOB Data: ff ff ff ff ff ff 3f 27 56 f5 29 d8 61 d9 9d 14
      OOB Data: ff ff ff ff ff ff 3f 27 56 f5 29 d8 61 d9 9d 14
      OOB Data: ff ff ff ff ff ff 3f 27 56 f5 29 d8 61 d9 9d 14

     

    If i found more information. i'll post more

     

    thank you

  • Let me recap:

    1) If you DO NOT use --pad option in mkfs.jffs2 and then use nandwrite WITH -p ====> ERRORS

    2) If you DO use --pad in mkfs.jffs2 and then use nandwrite WITHOUT -p =====> WORKS!

    Correct?

    If so I'll give it a try and tell you if I can confirm this too.

  • Hello,

    it seems to be working. I've removed "--pad" option in mkfs.jffs2, and used "-p" in nandwrite.

  • Main is size of paddding

    If size of padding is bigger than page size (default size of padding at mkfs.jffs is block size).

    then mount error happen

    you can  choice below 2 method

    1. mkfs.jffs --pad=page_size  and use nandwrite without -p option

    2. nandwrite with  -p option (remove --pad option at mkfs.jffs2)

     

    thank you

     

     

     

  • Hello,

    while testing I've noticed that the behavior of --pad option mkfs.jffs is completely broken. Basically, if option --pad is specified without any number, then it pads to a multiple of erase block size. But if a number is specified, it does pad the TOTAL FILE SIZE to that number, not just to a multiple of it. Have a look at "create_target_filesystem" function:

    If pad_fs_size is set, then this code is executed:

                   if (pad_fs_size && add_cleanmarkers){
                            padblock();
                            while (out_ofs < pad_fs_size) {
                                    full_write(out_fd, &cleanmarker, sizeof(cleanmarker));
                                    pad(cleanmarker_size - sizeof(cleanmarker));
                                    padblock();
                            }
                    } else {
                            while (out_ofs < pad_fs_size) {
                                    full_write(out_fd, ffbuf, min(sizeof(ffbuf), pad_fs_size - out_ofs));
                            }
                    }

    But out_ofs is the total number of bytes written! So the while condition (out_ofs < pad_fs_size) is normally false unless the total fs size is smaller than the pad_fs_size. This is not what you expect, in particular if you set the --pad=page_size. Suppose your flash page is 2048, then padding is done only if the resulting fs size is smaller than 2k. This is normally not the case and also is not what you expect.

    So, basically, if you use --pad=2048 you are just in the same case as not padding at all.

  • Hi, after a bit of testing I confirm that the problem is mkfs.jffs2 padding "--pad" option. If I leave it out and use the nandwrite "-p" the problem disappears. I'm still not sure if the problem if in mkfs.jffs2 or in the HW ECC when the page is filled with 0xFF.