Program Nand Flash with high failure rate

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Program Nand Flash with high failure rate

Jump to solution
3,971 Views
PatrickChau
Contributor II

Hi All:

We encountered a problem when programing kernel to the NAND flash of our iMX233 CPU module. We have about 10% fail cases when flashing the kernel to the NAND (we built 22xx pcs and have over 170 pcs NAND write fail). The NAND Flash that we are using is Samsung K9F1G08U0D.

We use the kobs-ng tool to flash the NAND. We first boot the Board with SD Card and write the kernel to the NAND.The below error message is from the first time programming:

Programing Bootloader...

mtd: device 0 fails MEMERASE (0x460000 - 0x20000)

mtd: Failed to erase block @0x460000

We tried to use the following command to program after encountered this error message:

echo 1 > /sys/devices/platform/gpmi-nfc.0/ignorebad

flash_eraseall /dev/mtd0

The following messages are get from the terminal:

flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it

Erasing 128 Kibyte @ 460000 -- 31 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 35 (mtd0)

        error 5 (Input/output error)

flash_erase: error!: /dev/mtd0: MTD Erase failure

             error 5 (Input/output error)

Erasing 128 Kibyte @ de0000 -- 100 % complete

Followed by the following Message

echo 1 > /sys/devices/platform/gpmi-nfc.0/ignorebad

flash_eraseall /dev/mtd0

flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it

flash_erase: Skipping bad block at 00000000

flash_erase: Skipping bad block at 00020000

flash_erase: Skipping bad block at 00040000

flash_erase: Skipping bad block at 00060000

flash_erase: Skipping bad block at 00080000

flash_erase: Skipping bad block at 000a0000

flash_erase: Skipping bad block at 000c0000

flash_erase: Skipping bad block at 000e0000

Erasing 128 Kibyte @ 440000 -- 30 % complete flash_erase: Skipping bad block at 00460000

Erasing 128 Kibyte @ de0000 -- 100 % complete

Then we entered:

echo 1 > /sys/devices/platform/gpmi-nfc.0/ignorebad

kobs-ng init /tmp/imx233_linux.sb

mtd: device 0 fails MEMERASE (0x460000 - 0x20000)

mtd: Failed to erase block @0x460000

We then power off the board. Configure it to NAND Boot, then we've got:

PowerPrep start initialize power...

Battery Voltage = 0.52Vwï¿þø

PowerPrep start initialize power...

Battery Voltage = 1.52Vßÿxð

PowerPrep start initialize power...

Battery Voltage = 0.88V

No battery or bad battery                                       detected!!!.Disabling battery                                   voltage measurements./r/nSep 18 201217:38:03

EMI_CTRL 0x1C084040

FRAC 0x92926192

init_ddr_mt46v32m16_133Mhz

Init Hynix HY5DU121622DT DDR SDRAM @ 133MHz

power 0x00820710

Frac 0x92926192

start change cpu freq

hbus 0x00000003

cpu 0x00010001

0x8050100b

0x80502008

Then it reboots periodically with the same message.

Does anybody have any idea? It seems the NAND write is influenced by the bad block problem. Thanks in advance.

Patrick

Labels (2)
Tags (1)
0 Kudos
1 Solution
1,313 Views
MarekVasut
Senior Contributor I

Can you try it with upstream (v3.7) kernel? I suspect the NAND driver in upstream kernel is actually working, the version in the BSP might just be an ancient crap.

View solution in original post

0 Kudos
2 Replies
1,313 Views
PatrickChau
Contributor II

Hi Marek:

           It is not the kernel's problem, it is found that the boot stream code fails to skip the bad block, what we do now is using the uboot to erase the nand flash once, and the program the kernel to the nand flash by using kobs-ng tool, then it works

Patrick

0 Kudos
1,314 Views
MarekVasut
Senior Contributor I

Can you try it with upstream (v3.7) kernel? I suspect the NAND driver in upstream kernel is actually working, the version in the BSP might just be an ancient crap.

0 Kudos