LPC54018 persistent variable storage in single SPI Flash across power cycles

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

LPC54018 persistent variable storage in single SPI Flash across power cycles

299 Views
mitchkapa
Contributor III
Hi,
 
I'm using an LPC54S018 microcontroller with a single 16 MB SPIFI flash.  The application code is too large to fit into RAM and so I am using the XIP_IMAGE flag during compile.  I need to store variables in the flash for access across power cycles.  I have been following the steps listed in this forum post:
 
but I can't modify the "test" variable once the code is running, because it is read-only.  Is there a way to make the test variable read/write, and able to be saved across power cycles?
 
Thanks for your help,
Mitch
0 Kudos
1 Reply

270 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

We need to use spifi flash command to erase and write spifi flash.

I suggest you check SDK spifi polling demo code:

ZhangJennie_0-1677662536968.png

 

Have a nice day,

Jun Zhang

0 Kudos