Good day All,
Are there any software examples that demonstrate how one can erase/write a sector of QSPI Flash while XIP from the same QSPI Flash? I recognize that you cannot do this directly, but would require copying the erase/write firmware to RAM, then execute from RAM, and once complete return back to the QSPI firmware. I thought before I start doing this I would see if there were any examples that I could learn from. Basically what I want to do is to store some data into flash (e.g. Ethernet MAC Address, etc) and then retrieve this info upon the next reboot.
Thanks in advance!
Cheers,
Sam
Solved! Go to Solution.
Hi samsaprunoff ,
Now, our example mainly copy all the project to the internal RAM, and download that code to the external flash, after booting from external flash, ROM will copy the code to the internal RAM, and run from internal RAM.
If you still want to run it XIP, give you the suggestion:
define the flash operation code to the RAM directly, you can define some RAM area to put the flash operation code.
Relocating Code and Data Using the MCUXpresso IDE
You can try it, whether it works OK or not.
Wish it helps you!
Kerry
-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------
Hi samsaprunoff ,
Now, our example mainly copy all the project to the internal RAM, and download that code to the external flash, after booting from external flash, ROM will copy the code to the internal RAM, and run from internal RAM.
If you still want to run it XIP, give you the suggestion:
define the flash operation code to the RAM directly, you can define some RAM area to put the flash operation code.
Relocating Code and Data Using the MCUXpresso IDE
You can try it, whether it works OK or not.
Wish it helps you!
Kerry
-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------
Good day Kerry,
Thank you for your prompt response and the information! I will give it a look and let you know how it goes.
Cheers,
Sam