Flash Read and Write,HOWTO???

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flash Read and Write,HOWTO???

1,106 Views
lpcware
NXP Employee
NXP Employee
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.

Kindly point me in the right direction.

Original Attachment has been moved to: 1100500_license.zip

0 Kudos
Reply
5 Replies

998 Views
lpcware
NXP Employee
NXP Employee
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.
0 Kudos
Reply

998 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by karthik.s on Wed Jun 30 05:08:50 MST 2010
Thanks Renan and CodeRedSupport.

.Can you tell me more from the perspective of LPC1114 device.I am unable to find iap_entry function declarations/prototypes anywhere.
0 Kudos
Reply

998 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by karthik.s on Wed Jun 30 04:48:20 MST 2010
Thanks renan and coderedsupport.I will look into those resources.
0 Kudos
Reply

998 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Wed Jun 30 04:20:52 MST 2010
karts

To read from flash, just use pointers.
This is a good tutorial: http://publications.gbdirect.co.uk/c_book/chapter5/
If you already know, ignore.

This is an example:
#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.

Renan
0 Kudos
Reply

998 Views
lpcware
NXP Employee
NXP Employee
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.

Regards,
CodeRedSupport.
0 Kudos
Reply