How do you get flex memory(Flex NVM) to work on an MK64FX?

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

How do you get flex memory(Flex NVM) to work on an MK64FX?

967 Views
edablan
Contributor II

Quick intro, we are using the ARM mbed cli and exporting a project to IAR. We have swapped the processors on our FRDM K64F board to an MK64FX512 that has flex memory. It's pin compatible as long as you use the same pin and package in this case the 100 LQFP package. I have run some code on the board after the micro swap and verified it works through a USART echo, and loading a FAT file system onto an SD card. The one thing I can't wrap my head on is the FlexMemory. 

So I have looked at the application note for using flex memory, however it does a pretty poor job of actually letting you know which steps are necessary for you to set up processor to enable. I need to know which registers to set specifically in what order, and how to do read and writes from a firmware perspective. There is not applicable explanation that can be found anywhere as to how to get this to work on firmware.

I have gone through the fsl_flash.c and fsl_flash.h that get compiled in and see there are some macros that need to be defined for you the get the FLASH_EepromWrite() function to work as well as some other configuration steps. However, this does help me understand which registers need to be set to choose the correct memory alloaction for E-Flash and E-Ram. It also doesn't have an interface for me to define the target correctly CPU_MK64FX512VLL12 and even when I create a project wide define inside the IAR preprocessor for CPU_MK64FX512VLL12, it still won't compile in the FLASH_EepromWrite() function and other configuration steps. Could someone write a useful application note that can be used to actually write firmware? or Share a demo project from NXP that shows the FlexMemory at work with source code included? So far I've been a big fan of the K64F, but this flex memory thing is getting annoying.

Labels (1)
0 Kudos
1 Reply

464 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

About K64 FlexMemory detailed operation info, customer could find from AN4282.

The K64 reference manual also provides some related info.

I would recommend customer to refer [TFS Flash Driver Software for Kinetis® and ColdFire+ Microcontrollers(REV 1.03)] about FlexMemory as EEPROM application.

Wish it helps.


Have a great day,
Ma Hui

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

0 Kudos