Content originally posted in LPCWare by karthik.s on Wed Jun 30 03:31:19 MST 2010 I am programming LPC1114 microcontroller for my project.I would like to know how to write data to flash memory and read it back from it.I have gone through the user manual UM10398(Chapter# 17) but could not get an idea on how to proceed.
[B]Scenario:[/B] I have interfaced the microcontroller with an network interface card using SPI.What i am supposed to do is to write the data from the NIC card into the flash memory and then read it from there immediately after resetting the microcontroller device.
Content originally posted in LPCWare by domen on Wed Jun 30 23:10:08 MST 2010 You know, there's this fine document called lpc111x user's manual. And it's on the first page when you google for lpc1114! The wonders of technology!
Seriously though, I can't imaging doing any work without that document. Get it, skim it, study the parts relevant to what you're doing.
#define READ_FLASH(object, adr) (*((object volatile *) (adr)))
// use it this way.
int *FlashPointer = (int *)0x40200;
int number;
number = READ_FLASH(int, FlashPointer);
To write flash use IAP, as CodeRedSupport said there is a lot of good info here. And google is your friend.
Content originally posted in LPCWare by CodeRedSupport on Wed Jun 30 03:57:12 MST 2010 There are quite a few previous forum threads on writing to flash. Try googling for "iap site:knowledgebase.nxp.com" or similar to find them.