How to properly replace image with XIP enabled on RT1060

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

How to properly replace image with XIP enabled on RT1060

Jump to solution
728 Views
rasm
Contributor I

I have 2 regions with XIP enabled on RT1060.
The first region is bootloader at 0x60001000 with its header at 0x60000400 and the second region is application image with its header at 0x6000400. I am writing all these with blhost and everything works fine.
I want to do a image update replacing only application image and its header. For replacing the header of the application image I need to delete the first sector (0x6000000-0x60001000) and then write it again with correct content. This poses a risk that I end up with chip that will not start up if during the erase process a power down happens.
My question is what options are there to prevent this situation during FW update?

0 Kudos
1 Solution
707 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello, 

Based on the information that you provided, I see two options. 

  1. You said that you have two flash regions. In one, you have the bootloader, and in the other, you have the application. When booting up, you can always boot to the bootloader. This way, you will jump to the main application only when you have a valid image and some condition is met. So, in the case where a power-down happens while erasing the application, next time, you will start from the bootloader. This will prevent that the RT won't start. 
  2. Instead of having two regions, you can have three flash regions. This way you will have the bootloader in one, the current application in other, and the new application can be in the third partition. This way you will always have an application to return if something happens during the firmware update. 

These are the two most common paths to prevent the RT won't boot due to firmware update issues. 

Regards,
Victor 

View solution in original post

0 Kudos
1 Reply
708 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello, 

Based on the information that you provided, I see two options. 

  1. You said that you have two flash regions. In one, you have the bootloader, and in the other, you have the application. When booting up, you can always boot to the bootloader. This way, you will jump to the main application only when you have a valid image and some condition is met. So, in the case where a power-down happens while erasing the application, next time, you will start from the bootloader. This will prevent that the RT won't start. 
  2. Instead of having two regions, you can have three flash regions. This way you will have the bootloader in one, the current application in other, and the new application can be in the third partition. This way you will always have an application to return if something happens during the firmware update. 

These are the two most common paths to prevent the RT won't boot due to firmware update issues. 

Regards,
Victor 

0 Kudos