KE15Z unable to write to FlexNVM using bootloader flash API

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

KE15Z unable to write to FlexNVM using bootloader flash API

跳至解决方案
1,392 次查看
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?

标记 (1)
0 项奖励
回复
1 解答
1,204 次查看
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 项奖励
回复
5 回复数
1,204 次查看
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 项奖励
回复
1,204 次查看
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 项奖励
回复
1,204 次查看
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 项奖励
回复
1,204 次查看
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 项奖励
回复
1,205 次查看
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 项奖励
回复