How to skip bad block while programming nand flash using cw10.x?

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

How to skip bad block while programming nand flash using cw10.x?

Jump to solution
3,088 Views
jianminlv0
Contributor I


When I use flash program plugin in CW10.x to program nand flash , i found that the programming stopped while programming a bad block. How to resolve the problem? Thank you!

Labels (1)
0 Kudos
1 Solution
2,358 Views
addiyi
NXP Employee
NXP Employee

But note that if indeed there are real bad blocks on nand device, even the CW will skip that block, your application will not boot. The workaround will works only if bad blocks are reported wrong by FP and our nand device don't have any bab blocks where uboot must be programmed.

Adrian

View solution in original post

0 Kudos
10 Replies
2,358 Views
jianminlv0
Contributor I

OK, thank you for your support!

0 Kudos
2,358 Views
addiyi
NXP Employee
NXP Employee

Let's try to skip bad block mechanism from CW Flash Programmer. For this go to: \PA\bin\plugins\support\Products\ProductData\FPDevices.mwpdb\FP\ and search for K9F5608Ux0D-eLBC.xml, then modify BAD_BLOCK_MECHANISM_TYPE from 3 to 0.

<additionalparameter>3</additionalparameter>   <!-- BAD_BLOCK_MECHANISM_TYPE -->

It is possible that something happened to your nand flash and it report false bad blocks, because first nand blocks are guarantee by flash manufacturer to have zero bad blocks.

Adrian

0 Kudos
2,358 Views
jianminlv
Contributor I

As what you said, if without  bad block checking mechanism, CW Flash Programmer is able to skip bad block automatically when reaching at a bad one and continue to program,  yes or not? Actually, I think CW Flash Programmer should skip it and continue to program next one when flash programmer algorithm report a bad block.

0 Kudos
2,359 Views
addiyi
NXP Employee
NXP Employee

But note that if indeed there are real bad blocks on nand device, even the CW will skip that block, your application will not boot. The workaround will works only if bad blocks are reported wrong by FP and our nand device don't have any bab blocks where uboot must be programmed.

Adrian

0 Kudos
2,358 Views
addiyi
NXP Employee
NXP Employee

With the settings above, Flash Programmer will skip bad block.

Adrian

0 Kudos
2,358 Views
TICS_Fiona
NXP Employee
NXP Employee

Hello Jianmin

The CodeWarrior debugger programs flash with ELF file which contains the programming data and its address. If there is any programming error in the process, by default, it will stop the programming and prompt error. Even it can ignore the error and continue to program the left data, the application cannot run as expected.

Best Regards

Fiona Kuang

TIC - Technical Information Center

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Mark Correct button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
2,358 Views
addiyi
NXP Employee
NXP Employee

Usually Flash Programmer will flash binary files and not elf files.

Adrian

0 Kudos
2,358 Views
jianminlv0
Contributor I

If i want to program uboot(400k) at offset 0 in nand flash, and there is a bad block(assume that block size is 128k) at block 1(generally speaking, block 0 is ok), how to program the uboot then?

0 Kudos
2,358 Views
addiyi
NXP Employee
NXP Employee

What flash programmer algorithm are you trying to use and fro what SoC/board?

Adrian

0 Kudos
2,358 Views
jianminlv0
Contributor I

flash programmer algorithm: K9F5608x0D-eLBC.elf

SoC/board: based on MPC8309, shipped with h27u518s2ctr nand

0 Kudos