KE15Z unable to write to FlexNVM using bootloader flash API

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

KE15Z unable to write to FlexNVM using bootloader flash API

Jump to solution
1,133 Views
eric_schwartz
Contributor I

Using the bootloader's flash API, my application code on my KE15Z (FRDM board) is able to erase/write to the program flash partition (0x0-0x2 0000) with no problems. When I tried to write to the FlexNVM partition (0x1000 0000), I got an invalid address error returned from flash_erase(). My config struct (screenshot attached) shows 0's for the FlexRAM/DFLASH/EEPROM fields. Is there extra configuration I need to do to write to those areas?

Tags (1)
0 Kudos
1 Solution
945 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Eric,

 

Sorry for my late reply.

 

I confirmed this internally and what you are trying to do is not possible.  ROM bootloader commands are capable to write only normal internal flash or RAM, FlexNVM is not supported.

 

Best regards,
Felipe

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
5 Replies
945 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Eric,

 

This will depend whether you configure FlexNVM to work as EEPROM or DFLASH. I recommend you to check the following application note that describes how to use FlexMemory as EEPROM and DFLASH.

How to use FlexMemory as D-Flash and EEPROM in KE1xF

 

In addition, you can check flexnvm_dflash and flexnvm_eeprom examples included in the SDK that describes how to use flash drivers to operate with FlexMemory.

 

I hope this helps!

 

Best regards,

Felipe

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
945 Views
eric_schwartz
Contributor I

The SDK examples do not use the bootloader's ROM-resident flashdriver API's.

I've partitioned the FlexNVM to be entirely D-flash, and can verify it's been partitioned by checking DEPART (or easier, just running the SDK example which does that for me).

0 Kudos
945 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello Eric,

 

Maybe you can share your code with me? So I can take a quick look to it.

 

Best regards,

Felipe

0 Kudos
945 Views
eric_schwartz
Contributor I

Attached is the core code I'm using. Most of the code lives as the structure, as given in the reference manual.

I forgot to add, the interrupt macros are defined below: 

#define EnableInterrupts __asm(" CPSIE i");
#define DisableInterrupts __asm(" CPSID i");

0 Kudos
946 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Eric,

 

Sorry for my late reply.

 

I confirmed this internally and what you are trying to do is not possible.  ROM bootloader commands are capable to write only normal internal flash or RAM, FlexNVM is not supported.

 

Best regards,
Felipe

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos