MFGTOOL is exiting with Chip ID Verification Error

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

MFGTOOL is exiting with Chip ID Verification Error

2,094 Views
mus
Contributor III

We are switching from MX30LF4G28AC-XKI to MX30LF4G28AD-XKI for our i.MX6SoloX based product. When trying to program the NAND, MFGTOOL is exiting with Chip ID verification error. I don't see this in the Linux driver or any other config. Any help will be appreciated.

ModuleID[2] LevelID[10]: CMyExceptionHandler thread is running
ModuleID[2] LevelID[10]: DeviceTypeDisk--_devices size: 1
ModuleID[2] LevelID[10]: Volume--StorageDisk, Disk->_driveNumber:1, Volume->_diskNumber:1
ModuleID[2] LevelID[10]: DeviceTypeDisk--find Disk device: 00FF1F48
ModuleID[2] LevelID[10]: Device::hubIndex::getmsc, return the port index is: 3
ModuleID[2] LevelID[10]: Device Manager thread is running
ModuleID[2] LevelID[10]: CmdOperation[0] device chagned and reset to state 1
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ mount -t debugfs debugfs /sys/kernel/debug
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ flash_erase /dev/mtd0 0 0
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is send, File is C:\Users\User\AppData\Local\Temp\v3cqvrwt.us2\Profiles\Prod\OS Firmware\uboot.bin
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ kobs-ng init -x -v --search_exponent=1 --chip_0_device_path=/dev/mtd0 $FILE
ModuleID[2] LevelID[1]: PortMgrDlg(0)--MSCDevice--Command Push(no file) excute failed
ModuleID[2] LevelID[10]: CmdOperation[0], current command executed failed, so SetEvent(hDevCanDeleteEvent)
11/18/2020 10:03:18 AM - MfgTool2Program() - MfgTool2 Chip ID verification error

 

Labels (1)
0 Kudos
12 Replies

2,082 Views
igorpadykov
NXP Employee
NXP Employee

Hi mus

 

error may be due to different IDs for both parts per appnote

AN0716V2-MGRT-MX30LF4G18AC to MX30LF4G28AD.pdf

One can try to add new part parameters to nand_ids

https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/mtd/nand/nand_ids.c?h=imx_4.9.11_1...

and rebuild manufacturing image as described in sect. 6.2 Manufacturing Tool, MFGTool

Yocto Guide included in linux   Documentation

 

Best regards
igor

0 Kudos

2,079 Views
mus
Contributor III

Thank you for your response. However, it seems like the kernel is detecting the NAND correctly.

[ 1.617985] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xdc
[ 1.624376] nand: Macronix MX30LF4G28AD
[ 1.628222] nand: 512 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 256
[ 1.641580] gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5
[ 1.649088] Bad block table not found for chip 0
[ 1.654147] Bad block table not found for chip 0
[ 1.658770] Scanning device for bad blocks

...
[ 1.951848] gpmi-nand 1806000.gpmi-nand: driver registered.

0 Kudos

2,068 Views
igorpadykov
NXP Employee
NXP Employee

when you say " kernel"  what do you mean,

log from mfg tool or just when booting some linux image ?

 

Best regards
igor

0 Kudos

2,058 Views
mus
Contributor III

My previous response has the kernel boot messages. Here is the summary.

  • uboot is able to scrub both MX30LF4G28AC and MX30LF4G28AD.
  • Linux kernel recognizes both MX30LF4G28AC and MX30LF4G28AD. Notice the page size, erase size, OOB size being detected correctly for both. Chip ID is the same between the two per migration guide.
  • Running `flash_erase /dev/mtd0 0 0` works for both flash from user space.
  • ISSUE: running `kobs-ng init -x -v --search_exponent=1 --chip_0_device_path=/dev/mtd0 $FILE` fails for MX30LF4G28AD but not MX30LF4G28AC.

 

uboot scrubbing for MX30LF4G28AC:

DRAM: 512 MiB
NAND: New GPMI ac-timing=0x10101@init 512 MiB
Using default environment

In: serial
Out: serial
Err: serial
Boot from USB for mfgtools
Use default environment for mfgtools
Run bootcmd_mfg: run mfgtool_args;nand scrub -y 0 0x20000000;nand erase.chip;bootz ${loadaddr} ${initrd_addr};
Hit any key to stop autoboot: 0

NAND scrub: device 0 whole chip
Erasing at 0x1a8c0000 -- 83% complete.
nand0: MTD Erase failure: -5
Erasing at 0x1ae00000 -- 84% complete.
nand0: MTD Erase failure: -5
Erasing at 0x1b300000 -- 85% complete.
nand0: MTD Erase failure: -5
Erasing at 0x1c780000 -- 89% complete.
nand0: MTD Erase failure: -5
Erasing at 0x1eb80000 -- 96% complete.
nand0: MTD Erase failure: -5
Erasing at 0x1ffc0000 -- 100% complete.
OK

NAND erase.chip: device 0 whole chip
Skipping bad block at 0x1ad80000
Skipping bad block at 0x1b200000
Skipping bad block at 0x1b480000
Skipping bad block at 0x1cb40000
Skipping bad block at 0x1ec00000
Erasing at 0x1ffc0000 -- 100% complete.
OK
Kernel image @ 0x80800000 [ 0x000000 - 0x2fc2a0 ]
## Loading init Ramdisk from Legacy Image at 83800000 ...
Image Name: fsl-image-mfgtool-initramfs-imx6
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 8591032 Bytes = 8.2 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
No gpc device node -9, force to ldo-enable.

Starting kernel ...

 

uboot scrubbing for MX30LF4G28AD:

DRAM: 512 MiB
NAND: New GPMI ac-timing=0x10101@init 512 MiB
Using default environment

In: serial
Out: serial
Err: serial
Boot from USB for mfgtools
Use default environment for mfgtools
Run bootcmd_mfg: run mfgtool_args;nand scrub -y 0 0x20000000;nand erase.chip;bootz ${loadaddr} ${initrd_addr};
Hit any key to stop autoboot: 0

NAND scrub: device 0 whole chip
Erasing at 0x2e00000 -- 9% complete.
nand0: MTD Erase failure: -5
Erasing at 0xa3c0000 -- 32% complete.
nand0: MTD Erase failure: -5
Erasing at 0x1ffe0000 -- 100% complete.
OK

NAND erase.chip: device 0 whole chip
Skipping bad block at 0x031e0000
Skipping bad block at 0x0a7a0000
Erasing at 0x1ffe0000 -- 100% complete.
OK
Kernel image @ 0x80800000 [ 0x000000 - 0x2fc2a0 ]
## Loading init Ramdisk from Legacy Image at 83800000 ...
Image Name: fsl-image-mfgtool-initramfs-imx6
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 8591032 Bytes = 8.2 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
No gpc device node -9, force to ldo-enable.

Starting kernel ...

 

Kernel boot messages with MX30LF4G28AC:

[ 1.608886] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xdc
[ 1.615276] nand: Macronix MX30LF4G28AC
[ 1.619121] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 112
[ 1.632481] gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5
[ 1.639968] Bad block table not found for chip 0
[ 1.645027] Bad block table not found for chip 0
[ 1.649654] Scanning device for bad blocks
...
[ 2.038646] gpmi-nand 1806000.gpmi-nand: driver registered.

 

Kernel boot messages with MX30LF4G28AD:

[ 1.609205] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xdc
[ 1.615596] nand: Macronix MX30LF4G28AD
[ 1.619443] nand: 512 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 256
[ 1.632804] gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5
[ 1.640325] Bad block table not found for chip 0
[ 1.645391] Bad block table not found for chip 0
[ 1.650015] Scanning device for bad blocks
...
[ 1.943315] gpmi-nand 1806000.gpmi-nand: driver registered.

0 Kudos

2,012 Views
ryandeville2
NXP Employee
NXP Employee

Hello,

I suspect that your issue is the differences in the page size when moving between the Macronix flashes.  Please see the Macronix app note here: https://www.macronix.com/Lists/ApplicationNote/Attachments/2068/AN0716V2-MGRT-MX30LF4G18AC%20to%20MX...

Because the previous flash used a 2k page size, I suspect you had to change your search exponent to 1.  Now that the page size is back to 4k, I believe you should go with the defaults on the kobs-ng tool.  So I would recommend modifying your script to remove the --search_exponent option, and let us know the results.  (If that doesn't work, please run the kobs-ng tool from the kernel with the basic options and let us know the output.)

Thanks,

Ryan

0 Kudos

1,976 Views
mus
Contributor III

Hi Ryan,

It goes farther but exits with another error now.

UTP: executing "kobs-ng init -x -v --chip_0_device_path=/dev/mtd0 $FILE"
MTD CONFIG:
chip_0_device_path = "/dev/mtd0"
chip_1_device_path = "(null)"
search_exponent = 2
data_setup_time = 80
data_hold_time = 60
address_setup_time = 25
data_sample_time = 6
row_address_size = 3
column_address_size = 2
read_command_code1 = 0
read_command_code2 = 48
boot_stream_major_version = 1
boot_stream_minor_version = 0
boot_stream_sub_version = 0
ncb_version = 3
boot_stream_1_address = 0
boot_stream_2_address = 0
-- We add the 1k-padding to the uboot.
.tmp_kobs_ng: verifying using key '00000000000000000000000000000000'
.tmp_kobs_ng: is a valid bootstream for key '00000000000000000000000000000000'
mtd: use new bch layout raw access mode
mtd: opening: "/dev/mtd0"
NFC geometry :
ECC Strength : 8
Page Size in Bytes : 4210
Metadata size : 10
ECC Chunk Size in byte : 512
ECC Chunk count : 8
Block Mark Byte Offset : 3995
Block Mark Bit Offset : 0
====================================================
mtd: opened '/dev/mtd0' - '(null)'
mtd: bootstream too large
mtd_init failed!

0 Kudos

1,916 Views
ryandeville2
NXP Employee
NXP Employee

Hi,

Please try this later version of imx-kobs inside the L4.9.11 rootfs.

Thanks,

Ryan

0 Kudos

1,910 Views
mus
Contributor III

This is working for AC variant. We will try with AD variant.

0 Kudos

1,961 Views
ryandeville2
NXP Employee
NXP Employee

Hello,

I've compiled an updated version of the rootfs, with a more up-to-date version of imx-kobs.  This will not solve the problem, but should provide more info.

Please save a copy of your old rootfs, then just rename this file to whatever you are using in your script currently.

Ryan

0 Kudos

2,016 Views
mus
Contributor III

-

0 Kudos

2,035 Views
igorpadykov
NXP Employee
NXP Employee
0 Kudos

2,030 Views
mus
Contributor III

Thanks Igor. This will take some time, so I would rather find a probable cause before we start doing a lot of work for testing new software builds. I don't see any commits that relates to any of these issues.

0 Kudos