how to use flash memory and otap together?

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

how to use flash memory and otap together?

561 Views
mangramarco
Contributor III

Hello,

i've a project with kw41z mcu with ble otap service and it works fine!

Now i need to store some permanent data into flash memory but it does a few issue.

In my .ld linker script file i wrote the follow area inside MEMORY section:

NVM_region (RW) : ORIGIN = 0x7E800 - 1, LENGTH = (0x7F7FF - 0x7E800 - 1).

like documentation explain, this region should be an interval of 0x1000 addresses before the product info region.

I'm trying to store the data starting from address 0x0007F000 that is inside the NVM_region with the FLASH_Program function from fsl_flash.c file. I can write the memory correctly however when i update the firmware with otap procedure this remove or override the memorized data.

i'm searching for a symbol to change inside .ld script to resolve this problem without success. How can i do?

thank 
Marco

0 Kudos
1 Reply

517 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hi Marco,

 

Hope you are doing well. Did you remove this section in the MKW41Z512xxx4_connectivity.ld?

Ricardo_Zamora_1-1646069964253.png

 

If not, the FILL is "overwriting" your previously written data.

Hope this helps.

 

Best Regards,

Ricardo

0 Kudos