How do I change RCHW dynamically

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

How do I change RCHW dynamically

1,918 Views
jjr_net
Contributor I

hello:

     Chip is S32R274.

      I have two boot ID, Normal the mcu find the 1st BOOT ID and run the program, if want to run the 2nd BOOT ID ,must jump from the 1st BOOT ID. 

      Now the question is how to change current BOOT ID(1st), make it invalid?  because BOOT ID and program is in the same Partition, i through flash driver to erase or rewrite the BOOT ID area, and then let sbc reset the MCU, but it generate IVOR1 errors and cannot reset.   is there any other way?  because i want to next power up the mcu can auto search the 2nd BOOT ID, and run the program, then i do not jump from the 1st BOOT ID. 

   thank you!

0 Kudos
Reply
3 Replies

1,835 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

because BOOT ID and program is in the same Partition, i through flash driver to erase or rewrite the BOOT ID area, and then let sbc reset the MCU, but it generate IVOR1 errors and cannot reset.   is there any other way?

Well, if you want to change Boot ID by reprograming the flash al the time, have in mind flash retention (theres limited number of program/erase cycles on flash). Refer to datasheet.

This is really not the way.

usually: You have BOOT ID for bootloader and then if no SW update is available, you will jump to the application.

because i want to next power up the mcu can auto search the 2nd BOOT ID, and run the program, then i do not jump from the 1st BOOT ID

Do you want it just once? When you program micro in your fab? Or you want to do it repeatedly?

regards,

Peter

0 Kudos
Reply

1,835 Views
jjr_net
Contributor I

Peter:

         thanks. it that my project has two bootloader and one app. two bootloader can update each other, after update , next power on i need the program from new bootloader run up directly , so i want change the boot ID(rchw). 

thank you very much!

0 Kudos
Reply

1,835 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

In this case you can rewrite RCHW, as I assume you wont do update too frequently.

But you need to do it from RAM, as the flash region where the RCHW is going to be update cannot be the one where the programing routine is executed.

Just load the executed code to RAM and change the RCHW.

"A flash memory program sequence operates on any page within the flash core. Within a
page, up to eight words may be altered in a single program operation."

Please refer to reference manual 39.5.1.2   Program

regards,

Peter

0 Kudos
Reply