Is it possible to my application to change the FOPT value?

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

Is it possible to my application to change the FOPT value?

436 Views
marcusyossimi
Contributor II

I want my application to decide if the next boot will be on internal flash or qspi external flash.

Is it possible to my application to write the FOPT value?

Labels (1)
0 Kudos
2 Replies

343 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Marcus,

Although I am not clear about the condition under which you update the code and boot from different source, I think it is okay to change value in the 0x40D and launch software Reset in your application code.
You can copy the page from 0x400 to an array, then execute page erase to erase the page from 0x400 in your application code, then modify the array corresponding 0x40d, then program the array to the page from 0x400. afterwards, you can execute software reset by setting the SYSRESETREQ bit in AIRCR register. For detailed inf, pls refer to user guide of Cortex-M4. After software reset, the K8x will reset based on new FOPT.

Hope it can help you

BR

Xiangjun Rong

0 Kudos

343 Views
marcusyossimi
Contributor II

Hello,Xiangjun Rong,

My main doubt now is on how to make my application in order to run on qspi.

I am working on MCUXPRESSO.

The initial vectors area, Flash config and BCA should stay on internal flash?

Best regards,

Marcus Yossimi

0 Kudos