TWRK40Kit has a K40X256, I couldn't erase a sector in FlexNVM.
According K20P144M100SF2RM.pdf, page 661
The Erase Flash Sector command is 0x09, it has a 24bit address parameter, but the FlexNVM is located at address 0x10000000, it is above 24-bit address space. How can I erase this FlexNVM?
Solved! Go to Solution.
Bit 23 controls which Flash block you're writing to.
When required by the command, address bit 23 selects between:
• program flash 0 (=0) block
• (for devices with FlexNVM) data flash (=1) block
• (for devices with program flash only) program flash 1 (=1) block
See section 28.4.12 of the K60 RM for more details, but that should get you going!
All the read/write FTFL commands are 24-bit address? How can we read/write FlexNVM?
Bit 23 controls which Flash block you're writing to.
When required by the command, address bit 23 selects between:
• program flash 0 (=0) block
• (for devices with FlexNVM) data flash (=1) block
• (for devices with program flash only) program flash 1 (=1) block
See section 28.4.12 of the K60 RM for more details, but that should get you going!