Is it possible to write data on EMC flash where code is running

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

Is it possible to write data on EMC flash where code is running

566件の閲覧回数
priyankb
Contributor III

Hi,

I am facing a problem regarding EMC Nor flash SST39VF3201C. I have my bootloader code on internal flash & user application on EMC nor flash. But when I try to write some data(variables) using LPCOpen APIs on a specific address far from code address it causes hard fault. I have initialized flash in bootloader & not(again) in user application. Code works fine & reading from an address is working too. Is there any solution for this.

Any help is appreciated.

Thank you.

Priyank.

ラベル(3)
タグ(2)
1 返信

425件の閲覧回数
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Priyank,

If I understood correct, you want to write in the flash while you are executing also from flash, right? 

This is not possible, if you want to write in flash then you must be running from RAM. For example, you should move the specific functions that are writing on the flash to the RAM memory. I recommend you read the following community post to see how to do this. Relocating Code and Data Using the MCUXpresso IDE 

Hope it helps!

Victor.

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------