Content originally posted in LPCWare by TheFallGuy on Mon May 14 11:36:34 MST 2012
Basically you need to use the IAP functions described in the User Manual for your part. Also search this forum for flash wear levelling - there has been code posted.
To write values into flash, you have to write in sectors. You have to erase a sector, and then write it, you cannot use it like ram, as it has a maximum number of erase cycles.