Write Image fail. frequently.

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

Write Image fail. frequently.

Jump to solution
588 Views
Seongyon_Jeong
Contributor III

Seongyon_Jeong_0-1751610568195.png

 

I’ve been using it without any issues until recently, but suddenly, I can no longer write the image.

The USB connection is confirmed to be working, and the DIP switch is set to Serial Download Mode.

What could be the reason it’s not working anymore?


What's even more strange is that I couldn’t figure out what was wrong, so I tested with another board — and the write was successful.
Then I reconnected the original problematic board, and this time the writing succeeded as well.

What could be the cause of this behavior?
Is there something unstable in the current software?
If it fails intermittently like this, what should I do to recover from the failure?



Below is the Log from the Tool window.

##########################################################################################################
Build image - operation started at 2025-07-04 15:16:10
##########################################################################################################
Build script is generated: build_image_lnx.sh
Build script is generated: build_image_win.bat
Build script is generated: build_image_mac.sh
Executing script C:\Users\VICTUS1\secure_provisioning_1\build_image_win.bat
### SCRIPT: Building image: C:\Users\VICTUS1\secure_provisioning_1\build_image_win.bat
Build HAB image
nxpimage hab export -c "C:\Users\VICTUS1\secure_provisioning_1\bd_files\imx_application_gen_win.bd" -o "C:\Users\VICTUS1\secure_provisioning_1\bootable_images\evkmimxrt1020_shell.bin" "C:\Users\VICTUS1\secure_provisioning_1\source_images\evkmimxrt1020_shell.srec"
Success. (HAB container: C:\Users\VICTUS1\secure_provisioning_1\bootable_images\evkmimxrt1020_shell.bin created.)
nxpimage succeeded
### Build flashloader as unsigned bootable image ###
nxpimage hab export -c "C:\Users\VICTUS1\secure_provisioning_1\bd_files\unsigned_MIMXRT1020_flashloader_win.bd" -o "C:\Users\VICTUS1\secure_provisioning_1\bootable_images\unsigned_MIMXRT1020_flashloader.bin" "C:\nxp\MCUX_Provi_25.03\bin\_internal\data\targets\MIMXRT1020\flashloader.srec"
Success. (HAB container: C:\Users\VICTUS1\secure_provisioning_1\bootable_images\unsigned_MIMXRT1020_flashloader.bin created.)
nxpimage succeeded
### Build flashloader as signed bootable image ###
nxpimage hab export -c "C:\Users\VICTUS1\secure_provisioning_1\bd_files\signed_MIMXRT1020_flashloader_win.bd" -o "C:\Users\VICTUS1\secure_provisioning_1\bootable_images\signed_MIMXRT1020_flashloader.bin" "C:\nxp\MCUX_Provi_25.03\bin\_internal\data\targets\MIMXRT1020\flashloader.srec"
Success. (HAB container: C:\Users\VICTUS1\secure_provisioning_1\bootable_images\signed_MIMXRT1020_flashloader.bin created.)
nxpimage succeeded
### RESULT of the script `Building image`: Success (return code = [0]SUCCESS)
Status of the operation: Success: Building image

##########################################################################################################
Write image - operation started at 2025-07-04 15:16:24
##########################################################################################################
The following fuses status was detected:
Executing script C:\Users\VICTUS1\secure_provisioning_1\gen_scripts\init_flashloader_win.bat
### SCRIPT: Starting flashloader: C:\Users\VICTUS1\secure_provisioning_1\gen_scripts\init_flashloader_win.bat
### Parse input arguments ###
### Check presence of FlashLoader ###
### RESULT of the script `Starting flashloader`: Success (return code = [0]SUCCESS)
Status of the operation: Success: Starting flashloader
OTP request: BOOT_CFG1 |= 0x2 (mask: 0x2); current value=0x0; status=WRITE
OTP request: SRK_HASH[255:224] |= 0x42a2392f; current value=0x0; status=WRITE
OTP request: SRK_HASH[223:192] |= 0xd380534e; current value=0x0; status=WRITE
OTP request: SRK_HASH[191:160] |= 0x9cd14797; current value=0x0; status=WRITE
OTP request: SRK_HASH[159:128] |= 0xe5619aef; current value=0x0; status=WRITE
OTP request: SRK_HASH[127:96] |= 0x9398b927; current value=0x0; status=WRITE
OTP request: SRK_HASH[95:64] |= 0xbe09caa9; current value=0x0; status=WRITE
OTP request: SRK_HASH[63:32] |= 0xddb7b0b4; current value=0x0; status=WRITE
OTP request: SRK_HASH[31:0] |= 0x26327105; current value=0x0; status=WRITE
SUMMARY: Detected status of fuses for write operation: some/all fuse(s) need to be burned
Status of the operation: Cancelled: The operation was cancelled by the user.
Status of the operation: Failure: Irreversible changes

##########################################################################################################
Write image - operation started at 2025-07-04 15:16:37
##########################################################################################################
The following fuses status was detected:
Executing script C:\Users\VICTUS1\secure_provisioning_1\gen_scripts\init_flashloader_win.bat
### SCRIPT: Starting flashloader: C:\Users\VICTUS1\secure_provisioning_1\gen_scripts\init_flashloader_win.bat
### Parse input arguments ###
### Check presence of FlashLoader ###
### RESULT of the script `Starting flashloader`: Success (return code = [0]SUCCESS)
Status of the operation: Success: Starting flashloader
OTP request: BOOT_CFG1 |= 0x2 (mask: 0x2); current value=0x0; status=WRITE
OTP request: SRK_HASH[255:224] |= 0x42a2392f; current value=0x0; status=WRITE
OTP request: SRK_HASH[223:192] |= 0xd380534e; current value=0x0; status=WRITE
OTP request: SRK_HASH[191:160] |= 0x9cd14797; current value=0x0; status=WRITE
OTP request: SRK_HASH[159:128] |= 0xe5619aef; current value=0x0; status=WRITE
OTP request: SRK_HASH[127:96] |= 0x9398b927; current value=0x0; status=WRITE
OTP request: SRK_HASH[95:64] |= 0xbe09caa9; current value=0x0; status=WRITE
OTP request: SRK_HASH[63:32] |= 0xddb7b0b4; current value=0x0; status=WRITE
OTP request: SRK_HASH[31:0] |= 0x26327105; current value=0x0; status=WRITE
SUMMARY: Detected status of fuses for write operation: some/all fuse(s) need to be burned
Write script generated: write_image_lnx.sh
Write script generated: write_image_win.bat
Write script generated: write_image_mac.sh
Executing script C:\Users\VICTUS1\secure_provisioning_1\write_image_win.bat
ERROR: Script failed with return code: [2]ERROR
### SCRIPT: Writing image: C:\Users\VICTUS1\secure_provisioning_1\write_image_win.bat
### Parse input arguments ###
### Check presence of FlashLoader ###
### Configure FlexSPI NOR memory using options on address 0x2000 ###
blhost -t 5000 -u 0x15A2,0x0073 -j -- fill-memory 0x2000 4 0xC0000007 word
{
"command": "fill-memory",
"response": [],
"status": {
"description": "0 (0x0) Success.",
"value": 0
}
}
blhost succeeded
blhost -t 5000 -u 0x15A2,0x0073 -j -- configure-memory 9 0x2000
{
"command": "configure-memory",
"response": [],
"status": {
"description": "0 (0x0) Success.",
"value": 0
}
}
blhost succeeded
### Erase memory before writing image ###
blhost -t 50450 -u 0x15A2,0x0073 -j -- flash-erase-region 0x60000000 45056 0
{
"command": "flash-erase-region",
"response": [],
"status": {
"description": "20106 (0x4e8a) FlexSPINOR: Command Failure.",
"value": 20106
}
}
blhost failed
### RESULT of the script `Writing image`: Failure (return code = [2]ERROR)
Status of the operation: Failure: Writing image


Below  picture is successfull  state.   again...   but I did  nothing...    when fail -> successful

Seongyon_Jeong_1-1751610813574.png

 

Tags (1)
0 Kudos
Reply
1 Solution
586 Views
marek-trmac
NXP Employee
NXP Employee

Hi,

this problems means the memory configuration is not valid or flash cannot be erased. Double check configuration of the external memory.

Regards,
Marek


NOTE: If you find the answer useful, kindly click on [ACCEPT AS SOLUTION] button

View solution in original post

0 Kudos
Reply
4 Replies
587 Views
marek-trmac
NXP Employee
NXP Employee

Hi,

this problems means the memory configuration is not valid or flash cannot be erased. Double check configuration of the external memory.

Regards,
Marek


NOTE: If you find the answer useful, kindly click on [ACCEPT AS SOLUTION] button
0 Kudos
Reply
574 Views
Seongyon_Jeong
Contributor III

You mean [from "FlexSPI NOR - simplified"], this part?

When I click it, the "Boot Memory Configuration" window pops up.
So you mean I should double-check the memory configuration in this window, right?

0 Kudos
Reply
569 Views
marek-trmac
NXP Employee
NXP Employee
Yes, this is what I mean.

Background information about flash configuration:
There are two options, how to configure FlexSPI NOR flash. By default, simplified option is selected, this works for most of the flash memories. During flash initialization, ROM converts the simplified configuration into FCB (flash control block), I think it is 256 or 512 bytes block configuration. If you have this block, you can use it directly in SEC.
Regards,
Marek


NOTE: If you find the answer useful, kindly click on [ACCEPT AS SOLUTION] button
0 Kudos
Reply
553 Views
Seongyon_Jeong
Contributor III
Thanks for reply.
0 Kudos
Reply