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.

NAND write giving Timeout error



Hi All,

We are using DRA6 processor with TI-sdk 7 . We are having issues in flashing NAND from u-boot. When we try to write large size of data it gives subsequent time outs before it writes the data successfully. We are using 512Mb NAND . We tried booting from SD card and tried nandtest utility to test nand. I am attaching the logs of nandtest in a file

This Timeout issue is random. After 4-5 timeouts we are able to write image on the NAND. Kindly see the logs :



U-Boot# fatload usb 0 0x81000000 mlo
reading mlo
18964 bytes read in 35 ms (528.3 KiB/s)
U-Boot# nand write 0x81000000 0x0 0x4a14

NAND write: device 0 offset 0x0, size 0x4a14
18964 bytes written: OK
U-Boot# nand write 0x81000000 0x20000 0x4a14

NAND write: device 0 offset 0x20000, size 0x4a14
18964 bytes written: OK
U-Boot# nand write 0x81000000 0x40000 0x4a14

NAND write: device 0 offset 0x40000, size 0x4a14
18964 bytes written: OK
U-Boot# nand write 0x81000000 0x60000 0x4a14

NAND write: device 0 offset 0x60000, size 0x4a14
18964 bytes written: OK
U-Boot# fatload usb 0 0x81000000 zimage_with_dtb
reading zimage_with_dtb
2997091 bytes read in 2427 ms (1.2 MiB/s)
U-Boot# fatload usb 0 0x81000000 am335x-boneblack.dtb
reading am335x-boneblack.dtb
36515 bytes read in 50 ms (712.9 KiB/s)
U-Boot# nand write 0x81000000 0x80000 0x8ea3

NAND write: device 0 offset 0x80000, size 0x8ea3
36515 bytes written: OK
U-Boot# fatload usb 0 0x81000000 u-boot.img
reading u-boot.img
312124 bytes read in 227 ms (1.3 MiB/s)
U-Boot# nand write 0x81000000 0xc0000 0x4c33c

NAND write: device 0 offset 0xc0000, size 0x4c33c
312124 bytes written: OK
U-Boot# fatload usb 0 0x81000000 uenv.txt
reading uenv.txt
189 bytes read in 17 ms (10.7 KiB/s)
U-Boot# nand write 0x81000000 0x140000 0xbd

NAND write: device 0 offset 0x140000, size 0xbd
189 bytes written: OK
U-Boot# nand write 0x81000000 0x160000 0xbd

NAND write: device 0 offset 0x160000, size 0xbd
189 bytes written: OK
U-Boot# fatload usb 0 0x81000000 zimage_with_dtb
reading zimage_with_dtb
2997091 bytes read in 1968 ms (1.5 MiB/s)
U-Boot# nand write 0x81000000 0x700000 0x2dbb63

NAND write: device 0 offset 0x700000, size 0x2dbb63
2997091 bytes written: OK
U-Boot# fatload usb 0 0x81000000 ngt_ubifs.ubifs
reading ngt_ubifs.ubifs
189399040 bytes read in 122910 ms (1.5 MiB/s)
U-Boot# nand write 0x81000000 0xa00000 0xb4a0000

NAND write: device 0 offset 0xa00000, size 0xb4a0000
Timeout!NAND write to offset a00000 failed -5
0 bytes written: ERROR
U-Boot# nand write 0x81000000 0xa00000 0xb4a0000

NAND write: device 0 offset 0xa00000, size 0xb4a0000
Timeout!NAND write to offset a00000 failed -5
0 bytes written: ERROR
U-Boot# nand write 0x81000000 0xa00000 0xb4a0000

NAND write: device 0 offset 0xa00000, size 0xb4a0000
189399040 bytes written: OK

Thanks

Deep Ter

root@ngt:~#
root@ngt:~# nandtest -k -o 0x0 -l 0x20000 /dev/mtd0
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
00000000: checking...
Finished pass 1 successfully
root@ngt:~# nandtest -k -o 0x20000 -l 0x20000 /dev/mtd1
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
00000000: checking...
Finished pass 1 successfully
root@ngt:~# nandtest -k -o 0x40000 -l 0x20000 /dev/mtd2
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
00000000: checking...
Finished pass 1 successfully
root@ngt:~# nandtest -k -o 0x60000 -l 0x20000 /dev/mtd3
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
00000000: checking...
Finished pass 1 successfully
root@ngt:~# nandtest -k -o 0x80000 -l 0x40000 /dev/mtd4
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
00020000: checking...
Finished pass 1 successfully
root@ngt:~# nandtest -k -o 0xc0000 -l 0x80000 /dev/mtd5
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
00060000: checking...
Finished pass 1 successfully
root@ngt:~# nandtest -k -o 0x140000 -l 0x20000 /dev/mtd6
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
00000000: checking...
Finished pass 1 successfully
root@ngt:~# nandtest -k -o 0x160000 -l 0x5a0000 /dev/mtd7
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
00580000: checking...
Finished pass 1 successfully
root@ngt:~# nandtest -k -o 0x700000 -l 0x300000 /dev/mtd8
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
002e0000: checking...
Finished pass 1 successfully
root@ngt:~# nandtest -k -o 0xa00000 -l 0xf600000 /dev/mtd9
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
0c9c0000: reading...
 44 bit(s) ECC corrected at 0c9c0000
0c9c0000: reading...
 32 bit(s) ECC corrected at 0c9c0000
0f5e0000: checking...
Finished pass 1 successfully
root@ngt:~#
root@ngt:~# nandtest -k -o 0x10000000 -l 0x10000000 /dev/mtd10
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
04760000: reading...
 18 bit(s) ECC corrected at 04760000
04760000: reading...
 32 bit(s) ECC corrected at 04760000
0ffe0000: checking...
Finished pass 1 successfully
root@ngt:~#