Issue with erasing NOR Flash on i.MXRT105X/106X

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

Issue with erasing NOR Flash on i.MXRT105X/106X

943 Views
dsonderer
Contributor I

Currently working on an i.MXRT1052 running Hyperflash in XIP. I'm using McuBootUtility to load the bootable image to the chip and it executes as planned.

The problem occurs when I try to mass erase (erase region does the same) the HyperFlash prior to re-writing it with another program. At the moment, I'm forced to update the Flash using a secondary program through a JTAG probe, running off of RAM. It seems like the flash locks itself but am not sure, haven't found proof yet.

Anyway, I get an error code "20106" every time, but I can't find any reference to this error code anywhere.

Has somebody already encountered this issue and/or has someone managed to find the source of it?

Thanks in advance.

Labels (2)
0 Kudos
7 Replies

922 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @dsonderer ,

  Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

   Can you also reproduce the issues on the NXP MIMXRT1050-EVKB board, that board is also the hyperflash.

  Please also share some screenshot about the issues, thanks. 

  Then I will test it on my side.

 

Best Regards,

Kerry

0 Kudos

905 Views
dsonderer
Contributor I

Hello, thanks for the responsiveness.

So, I haven't been able to reproduce the issue with the 1060-EVK (not the EVKB) using hello_world and the blinky from the base SDK.

Also, I'm running MCUXpresso 10.3 with the 105X board, and MCUxpresso 11.7 with the EVK.

And here is a screenshot from MCUBootUtility (running v4.1.0).

dsonderer_1-1682068430099.png

This occurs when the erase region or erase all functions are called (loading an image, simple erase region or mass erase...)

0 Kudos

902 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @dsonderer ,

1. Please check the BOOT_CFG configuration in your board.

2. Please check the MCUBootutility boot device configuration, whether it is selecting the hyperflash.

3. You mentioned the MIMXRT1060-EVK, do you modify it to the hyperflash and test it?

 

Best Regards,

Kerry

0 Kudos

897 Views
dsonderer
Contributor I

Hi, @kerryzhou 

1. Which part of the Boot_cfg precisely? I just checked : boot_device_selection is set to FlexSPI NOR, Hold_time to 500us, encryptedXIP disabled and flash type to 1V8 HyperFlash.

2. Yup, set to cypress_Hyperflash each time

3. And yes, it's currently in Hyperflash config, following the schemes, and it seems to be working correctly. Concerning our board, it's set to Hyperflash by default, QSPI isn't even mounted.

Best regards,

Dodo.

0 Kudos

855 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @dsonderer ,

  1. which hyperflash you are using?

2. Share the device configuraiton to me

kerryzhou_0-1682231171725.png

 

3. MCUBootUtility log sharing

4. what about the flexspi_polling code, whether that code mass erase works or not?

Best Regards,

Kerry

 

0 Kudos

785 Views
dsonderer
Contributor I

Hi, @kerryzhou

1. I'm running Spansion's S26KS128S, so I'm using the "Cypress_Hyperflash" config.

2. Here is the screenshot of the boot configuration window :

dsonderer_0-1682327935948.png

3. The log is in the attached files. By the way, the three erase commands at the end of the log correspond to a "load unsigned image", an "erase" and a "mass erase".

The exact messages I get in the MCUBootUtility console for the erase commands are :

Executing: C:\Users\dsonderer\Documents\NXP Tools\MCUBootUtility-Copy\NXP-MCUBootUtility-4.1.0\NXP-MCUBootUtility-4.1.0\tools\blhost2_3\win\blhost -t 2048000 -u 0x15A2,0x0073 -j -- flash-erase-region 1610612736 262144 9
toolStatus: 0
commandOutput: {
"command" : "flash-erase-region",
"response" : [],
"status" : {
"description" : "20106 (0x4E8A) kStatus_FlexSPINOR_CommandFailure",
"value" : 20106
}
}

Executing: C:\Users\dsonderer\Documents\NXP Tools\MCUBootUtility-Copy\NXP-MCUBootUtility-4.1.0\NXP-MCUBootUtility-4.1.0\tools\blhost2_3\win\blhost -t 2048000 -u 0x15A2,0x0073 -j -- flash-erase-all 9
toolStatus: 0
commandOutput: {
"command" : "flash-erase-all",
"response" : [],
"status" : {
"description" : "20106 (0x4E8A) kStatus_FlexSPINOR_CommandFailure",
"value" : 20106
}
}

4. Yes, actually I inject the same code with a different program via JTAG into the RAM in order to erase it properly.

0 Kudos

748 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @dsonderer ,

   Thank you for your updated information.

   1. From your log, your external flash is not recognized.

     Seems related to the hardware.

   2. You mentioned: Yes, actually I inject the same code with a different program via JTAG into the RAM in order to erase it properly.

   So, your RAM flexspi_polling code totally works with your hyperflash, right? What about read and write?

  Please try to slow down the frequency in the MCUBootUtility, whether it works or not?

  What's the frequency you are using in the RAM code?

 

Best Regards,

Kerry

0 Kudos