Failure to skip bad block

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Failure to skip bad block

1,655件の閲覧回数
junya
Contributor III

I have a custom board with a i.MX8MP and a KIOKXIA TH58NVG4S0HTAK0 which should be used as boot device.

Boot device:NAND FLASH 2GB (2 chip select, 1chip select is 1GB)

brunch:imx-linux-hardknott

manifesto:imx-5.10.35 2.0.0.xml

DISTRO:fsl-imx-wayland

MACHINE:mx8mpevk

uuu ver :1.5.21

Writing images to nand flash uses uuu.

In this process, some boards succeed in writing and others fail.
From the errors, it looks like it is failing to skip bad blocks.
Why does it fail to skip bad blocks?

The logs for each are attached.
They are shown side by side, the left is for failure and the right is for success.

 

Best regards.

タグ(2)
0 件の賞賛
返信
5 返答(返信)

1,577件の閲覧回数
_angelo_
Contributor III

Few words in a less academic, but pragmatic way.

nand without bad blocks is a dream. And bad block table exists to track bad blocks. The problem is typical of nand devices, that are known to be error-prone. So nand needs to be accessed with proper ECC support from the driver.

If you flash through uuu, the access may be done by u-boot, please verify to have recent u-boot/fastboot and updated drivers for the device. 

As file system, ubifs is an option for quite relaible fs now a day.

https://www.micron.com/-/media/client/global/documents/products/technical-note/nand-flash/tn2959_bbm...

0 件の賞賛
返信

1,639件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @junya,

I hope you are doing well.
 

Bad Block is an area of storing media that is no longer reliable for the storage of data because it is completely damaged or corrupted. Bad blocks may be present when the device is shipped, or may develop during the lifetime of the device. Click on this link for: Bad block management in NAND flash memory

The following command will clear the list of bad clusters on the volume specified and re-scans all allocated and free clusters for errors.

NOTE: Execute this command only on the machine that was being backed up. Specifying the volume for which the warning occurred.

Type the following command to unmount the drive you want to check: sudo umount /dev/sdb

Replace "/dev/sdb" with the device name for the drive you want to check.

Type the following command to check the drive: sudo fsck /dev/sdb

Run the "fsck" command a second time if any number other than zero appears. This ensures that all errors are corrected.

Reboot the system or type the command "sudo mount /dev/sdb" to remount the drive.

You can also go through a conversation here, it might help you with a hint: https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-skip-bad-block-while-programming-n...

Thanks & Regards,
Dhruvit Vasavada
0 件の賞賛
返信

1,607件の閲覧回数
junya
Contributor III

Hi, @Dhruvit .

Thank you for your reply.

I guess your advice is that we can do well on the kernel.

But i still don't understand it.

 

I attach the script of uuu.

Please advise how to modify this script to skip bad blocks.

0 件の賞賛
返信

1,583件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @junya,

I hope you are doing well.
 
During the lifetime of the NAND device additional bad blocks may develop. NAND devices have a status register that indicates whether an operation is successful. Additional bad blocks are identified when attempts to PROGRAM or ERASE give errors in the status register. note that if indeed there are real bad blocks on nand device, even the CW will skip that block, your application will not boot.
For the other way: there are various steps mentioned in the following document which may help you: https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors/92634/2/AN_MX_NAND_BAD_BL...
The workaround will works only if bad blocks are reported wrong by FP and our nand device don't have any bad blocks where uboot must be programmed. If one needs to skip bad block mechanism from CW Flash Programmer, then go to: \PA\bin\plugins\supportProducts\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 -->
Also please confirm that the following parameter is enabled on your system CONFIG_MTD_NAND_MXC=y
 
The bad block information is written prior to shipping. The flash manufacturer guarantees to have zero bad blocks for NAND. It can be possible that something happened to your nand flash from your side and now it reports bad blocks.
 
Thanks & Regards,
Dhruvit Vasavada
0 件の賞賛
返信

133件の閲覧回数
junya
Contributor III

Hi @Dhruvit ,

We removed the NAND flash from the problematic board and had it analyzed by Kioxia. As a result, the component was determined to be good. Additionally, there were no acquired bad blocks, and the bad blocks that were identified matched the ones that were skipped during writing with uuu.


This means that while bad blocks can be skipped during flashing, they are not being skipped during reading. We have limited experience with NAND flash and are unsure how to address this issue.

 

Best regards,

0 件の賞賛
返信