problem with IAP-based internal flash programming.

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by edsut on Wed Jun 26 12:50:58 MST 2013

I'm working with "SimpleCortex" board, and have been stumbling on an issue with flash programming using the IAP functions.  Basic implementation of flash write/erase is very straight forward; however, there are times when I need to just clear (write) one bit (changing it from a '1' to a '0') while leaving all other bits within a 256-byte range unchanged.  I assume I am allowed to do this, as long as I read in the 256-byte block to ram, make the single-bit change, and then write that block back to the flash.  Is this a valid assumption?

If it is, then more information on how I reproduce this problem is found here:

<a href="http://www.brc-electronics.nl/component/kunena/5-Programming-and-software/565-flash-programming-problem?Itemid=0#568">http://www.brc-electronics.nl/component/kunena/5-Programming-and-software/565-flash-programming-problem?Itemid=0#568</a>

Sure would be nice if someone could tell me what I'm doing wrong.  This problem appears to be VERY data dependent; hence the reason for my use of what appears to be a random block of data (its not actually random, but its what I was using when I noticed the problem).

Thanks for any ideas!