LPC54018 persistent variable storage in single SPI Flash across power cycles

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC54018 persistent variable storage in single SPI Flash across power cycles

2,875件の閲覧回数
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 件の賞賛
返信
5 返答(返信)

2,871件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @mitchkapa 

There is XIP demo under SDK demo, you can have a look:

Alice_Yang_0-1675930047424.png

 

 

BR

Alice

0 件の賞賛
返信

2,857件の閲覧回数
mitchkapa
Contributor III

Hi, Alice, thanks for your reply but I am afraid that demo isn't helpful for us.  We are currently able to do XIP but our problem is specifically that we cannot do an Erase/Write within another partition of the same physical flash while we are XIP from that same flash part.

I am now exploring if we can execute our code from Board SDRAM which will then allow us to manipulate the SPI Flash while in application.

0 件の賞賛
返信

2,837件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @mitchkapa 

 

How about "lpcxpresso54s018_spifi_polling_transfer"?

 

BR

Alice

0 件の賞賛
返信

2,830件の閲覧回数
mitchkapa
Contributor III

I think this example does cover some of what we need to accomplish.  However, our code is too large to fit into SRAMX.  I think we need to be able to execute from Board_SDRAM.  Is there any example code available for that?

I found document AN12423 but I haven't had success trying to follow it yet.  Possibly because of section 2.3 of that document.  It was unclear to me exactly where those code changes for the MPU needed to be made.

0 件の賞賛
返信

2,810件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @mitchkapa 

About  MPU  configuration, please refer to <Arm®v7-M Architecture Reference Manual> -> B3.5.7 MPU Region Number Register, MPU_RNR, you can download from Arm website, I also attached it for you.

 

BR

Alice

 

0 件の賞賛
返信