two firmwares in internal flash of I.MXRT1064

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

two firmwares in internal flash of I.MXRT1064

751 Views
anupbhutada4
Contributor I

Micro Controller : I.MXRT1064

Scenario : 1. Firmware1 will be running on address 0x70000000 in internal flash.

So in my application, I will receive Firmware2 code(.hex) from server and I will write it on 0x70300000. then I have to run 0x70300000(Firmware2).

My understanding is : 1. I will flash code (firmware1) using debugger at address 0x70000000 and I will write code to receive data from server and I will write it in internal flash at address 0x70300000 by following API:

status = flexspi_nor_flash_page_program(instance, &config, address, &write_temp_regi); // program 1 page

So my question is how to jump to this address 0x70300000 ? Or is there any other way like swap address ?

Please help me step by step and if screen shots are there , it will be well and good.

Thanks in Advance.

Labels (1)
0 Kudos
1 Reply

551 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Anup,

The proposed flow has some faults. You would have to use a secondary bootloader as a controller for the FW update. The secondary bootloader will boot first after each reset and decide what to do next (jump to the application at address 0x70000000 or 0x70300000 ). It is basically the same principle as any bootloader.

Once you have the second application ready to run, you will need to send a software reset to the CPU from the first application. In the reference manual of the RT1064 please take a look into the SRC Control Register to the core0_rst field to make a software reset. 

pastedImage_1.png

Once you send the software reset, in your secondary bootloader you need to decide if you want to jump to your first or second application. 

To jump to the first or second application you can use the Cortex-M7 instruction set, specifically the branch instruction. You can find more information about this instruction in chapter 3 of the Arm Cortex-M7 Generic User Guide (link). 

 
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos