I'm trying to use the Processor Expert IntFlash component to use a part of the program memory of the MK22FN512 as non-volatile storage.
Whenever I call any of the SetByteFlash, SetBlockFlash etc. I get the return value 3 (ERR_VALUE). Stepping through the code sees that this is caused by an Access error.
I understand that the Flash memory on the MK22F512 is in 2KB blocks, so I allocated a ROM/RAM Area in the CPU Component's Build Options at 0x7FC00, with size 0x400 and qualifier RWX. I also reduced the size of the m_text area by 0x400 from 0x7FBF0 to 0x7FBC0. I pass the address 0x7FC00 as the dest in the call to SetByteFlash or SetBlockFlash.
The corresponding calls to GetByteFlash and GetBlockFlash return with no error (ERR_OK) and it appears that the data read out is valid (all 0xFF as I can't write anything there).
I would appreciate any assistance.