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....