AnsweredAssumed Answered

ERR_VALUE writing using IntFlash on MK22FN512

Question asked by Jamie Wood on Aug 5, 2015
Latest reply on Aug 7, 2015 by Jamie Wood

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.

 

Thanks,

 

Jamie

Outcomes