Hello! I am using LPC2138. i do some comutation with variables and want to store these variables parmanently, and start next computations with these saved variables. Means i want to store data into Flash. Can any body help me. Some small sample code will be a great help.
Thanks in advance
What you want is to use the 'In Application Programming' (IAP) api. The boot ROM of the Philips ARM has a number of functions to control programming and erasing of the code flash eeprom from a running program.
It is described in the User Manual of your chip. An early version is at www.nxp.com/.../UM10120_1.pdf, chapter 20.9.
You can also find code examples on the pdf book 'The Insider's guide to the NXP ARM7', at www.hitex.co.uk/.../index.html .
Basically, you can setup a RAM block of data and copy it to a flash code area using the built-in IAP functions.
In addition to that, you can find a little more info on this apnote (AN10256): www.standardics.nxp.com/.../an10256.pdf