How to skip programming NVM_region on flash

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

How to skip programming NVM_region on flash

3,123 Views
FedericoWegher
Contributor III

Hello.

I am using MCUXpresso 11.2.0 for KW38 with SDK 2.6.6.

I am using TMC and TMS ble demo applications. I enabled bonding, and all works fine.

The problem I am facing is that when I re-flash one device, let's say TMC, bonding fails because flashing erased NVM region.

So I tried to edit "Debug configuration" and add a skip memory area in "Debugger->Advanced options->Preserve this range". However, the NVM region is always re-flashed with 0xFF.

How can I skip re-flashing of NVM_region, to keep its content?

0 Kudos
Reply
8 Replies

2,923 Views
kerryzhou
NXP TechSupport
NXP TechSupport


Hi FedericoWegher,

  Really thanks so much for your patient and understanding.
  Today, I checked your issues again, and test the temperature_collector and the temperature_sensor.
   1. About the FlexNVM

      Your attached picture should just from the P&E debugger, P&E debugger associate with MCUXPresso IDE has it, the other debugger, eg, JLINK don't have it.
     And to kw38 chip, FlexNVM is not the Pflash, I am afraid the debugger interface can't realize the preserve function to the FlexNVM as Dflash.
Please check the KW38 memory map with FlexNVM as Dflash.

14.jpg

But, I think, if you really want to perserve the FlexNVM data, you also can use the flash driver, use the Flash commander to write it in the app code.
Take an example, after boot, check the related FlexNVM area, if it is all 0XFF, then you can write the flash commander to write that area to your orginal data.
I also debug my temperature_collector, in your mentioned FlexNVM also don't have the data, it all are 0XFF

15.jpg

2 About code function
Could you tell me why you need that flexnvm area, as when I test it directly, even I don't have that area, I still can bond, two boards works OK, one as collector, another as sensor.
This is my test result:

16.jpg

 

Do you test the SDK two project directly? As I check your mentioned NVM region, no data, I still can make it works.
I think maybe your issue is not caused by this area.
Do you have two NXP FRDM-KW38 board, can you test it again whether it works?
If you already use the FRDM-KW38 board, can you tell me how to reproduce your issues, as I still can realize bond.

Any updated information from your side, just kindly let me know.

 

Best Regards,

Kerry

0 Kudos
Reply

3,107 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi FedericoWegher,

   Do you mean these two projects?

 

   Now, the newest SDK version is SDK_2.6.7_FRDM-KW38, you can download the newest SDK, and test it.

When you debug the code again, can you download the code to the flash?

Do you just run the SDK project and meet the NVM erased issues?

What's the board you are using? FRDM-KW38? What's the debugger you are using now?

I will test it on my side.

Waiting for your more information.

 

Best Regards,

Kerry

0 Kudos
Reply

3,097 Views
FedericoWegher
Contributor III

Please find below my replies.

Do you mean these two projects? >>> Temperature Sensor and Temperature Collector

Now, the newest SDK version is SDK_2.6.7_FRDM-KW38, you can download the newest SDK, and test it. >>> No, now I cannot switch to new SDK. Can you use previous one?

When you debug the code again, can you download the code to the flash? >>> Yes, I can download code to flash with no problem.

Do you just run the SDK project and meet the NVM erased issues? >>> I only added a skip memory region in debugger page from 0x7b800 to 0x7f7ff.

What's the board you are using? FRDM-KW38? What's the debugger you are using now? >>> I am using FRDM-KW38, using MCUXpresso and its toolchain.

I will test it on my side.

Waiting for your more information.

0 Kudos
Reply

3,079 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi FedericoWegher

  Please tell me what the FRDM on board debugger you are using? CMSIS DAP or the JLINK or others?

   Please also give me an screen shot about"  I only added a skip memory region in debugger page from 0x7b800 to 0x7f7ff." You means, you want these area don't be erased, and reserve the previous data when downloading the new app, right? But the MCUXPresso also erase this area, right?

 

Best Regards,

Kerry

0 Kudos
Reply

3,067 Views
FedericoWegher
Contributor III

Hi.

Please find my replies below.

Please tell me what the FRDM on board debugger you are using? CMSIS DAP or the JLINK or others? >>> I am using JLink on FRDM. I also managed to reproduce the problem on my hardware, which is using P&E Micro debugger probe.

You means, you want these area don't be erased, and reserve the previous data when downloading the new app, right? But the MCUXPresso also erase this area, right? >>> I want to preserve the content of this area, so it must be neither erased nor programmed. See the picture below.

Screenshot from 2020-09-28 14-51-25.png

0 Kudos
Reply

3,020 Views
FedericoWegher
Contributor III

Hi.

Do you have any update for me?

Thank you.

Federico

0 Kudos
Reply

2,996 Views
kerryzhou
NXP TechSupport
NXP TechSupport

So sorry for my later reply, we are in the Chinese National day(10.1 to 10.8) now, and will be back to work in 10.9.

Please keep the patient, I will reply to you in 10.9, thanks a lot for your understanding.

 

Best Regards,

Kerry

0 Kudos
Reply

2,981 Views
FedericoWegher
Contributor III

Hi. I wish you good holidays.

Waiting for your feedback,

Federico

0 Kudos
Reply