D-Flash (aka FlexNVM Flash) Behavior from POR or SW reset

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

D-Flash (aka FlexNVM Flash) Behavior from POR or SW reset

714 Views
carltonblow
Contributor I

Part is an MK20DX128VLF5 on my own board. I have rolled a USB bootloader which depending upon conditions permits updating of application space (the P-FLASH minus the protected bootloader area) or data space (the D-FLASH). The D-Flash is not set up or being used as part of any Flex-EEPROM functionality. The general flow is erase the desired target FLASH block, update it, followed by a SW reset after a small delay to restart.

Updates to the application work absolutely fine. However updates to the data space D-Flash behave oddly. For example I have a simple application that IF there is a non-ones value in a particular location of the D-Flash, it utilizes that D-Flash value instead of some default value for setting an LED blinkie rate. Toggles of the external reset pin switch between using the default rate, or the D-Flash based rate.

If I update the D-Flash with a value, when the SW reset occurs, the application uses only the default value and never the value stored in D-Flash. HOWEVER, if I unplug/replug the USB power source (essentially a POR), all is fine and LED blinkie rate toggles between the value in D-Flash and the default value (using the external pin reset as the toggle trigger).

I looked for any information regarding the D-Flash behavior w.r.t. POR or SW reset and did not see anything to suggest it behaves differently between either type of reset. Again, P-FLASH updates behave the same regardless of the reset being POR or SW.

So I'm wondering if someone may know of some information out there that I may have overlooked w.r.t. special considerations when it comes to reset type after D-Flash is updated....

Labels (1)
0 Kudos
Reply
2 Replies

582 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello carltonblow

 

How did you do the partition of the flash? Please make sure that the EEPROM Data Set Size is 0.

The other flash locations behaves the same way?

 

Let me know if this is helpful.

Best regards,

Omar

0 Kudos
Reply

582 Views
carltonblow
Contributor I

Hi Omar, thanks for your reply!

The partition is unchanged from a blank part. That is the FlexNVM is all D-Flash by default (I believe?), none is being partitioned/used for the EEPROM emulation functionality. So if my understanding is correct, no partitioning is necessary in this particular case because I am not changing the partition from the default blank part case, it already is partitioned to what is desired for my particular case.

My understanding is the EEPROM data set size is by blank part default 0 (ala '1111'b) and that is what I've kept it to (otherwise I believe I would not get correct D-Flash access behavior after a POR).

By other Flash locations I'm not sure if you are referring to the P-Flash, or other actual locations of the D-Flash. But no the P-Flash behaves entirely correct. As to other D-Flash locations, no I have not made attempts to move the non-ones test value to another location within D-Flash.

Regards,

Carlton

0 Kudos
Reply