Stephen
When writing to program/data flash on the K64 each phrase (8 bytes) is written together with the command sequence.
I saw that you were setting data to the FlexNVM RAM buffer, which is not involved in the process.
If you program one of the demo binaries from the K64 links below you can also play with the Flash interface. Depending on which application is installed the command line interface (shell) appears on the UART, Telnet or USB-CDC and has an I/O sub-menu with the commands:
Input/Output menu
===================
up go to main menu
md Memory Display [address] [<l>|<w>|<b>] [num]
mm Memory Modify [address] [<l>|<w>|<b>] [val]
mf Memory Fill [address] [<l>|<w>|<b>] [val] [num]
sd Storage Display {as md}
sm Storage Modify {as mm}
sf Storage Fill {as mf}
se Storage Erase [address] [len-hex]
set_ddr Set port type [1..4] [<i>|<o>
get_ddr Get data direction [1..4]
read_port Read port input [1..4]
write_port Set port output [1..4] [0/1]
save Save port setting as default
help Display menu specific help
quit Leave command mode
The memory commands (md, mm, mf) are standard direct memory-mapped reads and writes so "md" can be used to read from the Flash but any attempted write will (of course) cause an exception.
If, however, the "storage" commands (sd, sm, sf, se) are used instead the operations pass through the appropriate Flash interface and so flash operations can be tested.
If FlexNVM in enabled in the project the FlexNVM will appear as linerally mapped memory, contiguous to the internal program/data Flash and so the same commands can also be ued to work with this area. In fact a "sf 7fff0 l 55 100" would (assuming the data flash ends at 0x7ffffff and there is some FlexNVM available) cause a data fill starting towards the end of the program flash and continuing to the FlexNVM data flash (although its physical memory is mapped elsewhere - and readable from the physical address with the "memory"versions - and twodifferent programming algorithms are actually used for the operations).
Furthermore, if there is additional serial based Flash in the system (various types are supported) this memory is also simple contiguously accessible in the "virtual" storage space meaning that applications don't need to be aware of what type of memory it actually is or where it is physicaly located.
This may at first glance not be spectacular in any way but it opens up capabilities without any programming effort by simply utilising the storage interface rather than the memory interface - for example the FreeMaster interface built into the uTasker project allows read monitoring and write modifcations in any memory (RAM, Flash, SPI Flash, FlexNVM etc.), whereas the standard FeeMaster interface is limited to only SRAM without major redesigns. File systems can also utilise multiple physical Flash types as if it were a single larger pool of memory.
Regards
Mark
Kinetis: µTasker Kinetis support
K64: µTasker Kinetis FRDM-K64F support / µTasker Kinetis TWR-K64F120M support / µTasker Kinetis TWR-K65F180M support
For the complete "out-of-the-box" Kinetis experience and faster time to market