lpc2000 internal EEPROM

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

lpc2000 internal EEPROM

456 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by m2babaey on Mon Jul 01 21:41:04 MST 2013
Hi
I searched the net to find out how I can write into lpc2000 internal EEPROM
I found some for other devices but nothing for lpc2000, I even doubt if lpc2000 has internal EEPROM!
Can anyone help me figure out how I can read and write to internal EEPROM of lpc2388 if it has any such memory?
0 Kudos
Reply
6 Replies

446 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by m2babaey on Wed Jul 03 08:36:50 MST 2013
Thanks
I didn't knew memcpy works for copying from flash to SRAM
Can I ask one more question?
I want to store some variables to the battery backed up SRAM. I know the address range for battery SRAM, so I have to tell the compiler to store my variable in an address for that address range
I searched the net and concluded that I have to make a scratter file to specify where my different variables should be stored
I am studying linker documentation to find out how to make the scratter file, but they seem somehow confusing too, isn't there a simpler solution to store in battery SRAM?
Thanks again
0 Kudos
Reply

446 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Jul 03 05:36:42 MST 2013

Quote: m2babaey
So could you please tell me how?
for example I have an unsigned char variable called myVar and I want to put the value in address 0x00079FFD of flash into it?
how can I do that?
could you please write a single or a few lines of C code that does this task?
Thanks in advance. I'm a bit confused



memcpy(&myVar, 0x79ffd, sizeof(myVar)) ;

How difficult is that?
0 Kudos
Reply

446 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by m2babaey on Wed Jul 03 04:18:06 MST 2013

Quote: TheFallGuy
1. No.
2. Are you serious? For reading, flash is just memory, so just read it!



So could you please tell me how?
for example I have an unsigned char variable called myVar and I want to put the value in address 0x00079FFD of flash into it?
how can I do that?
could you please write a single or a few lines of C code that does this task?
Thanks in advance. I'm a bit confused
0 Kudos
Reply

446 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Jul 03 04:05:53 MST 2013
1. No.
2. Are you serious? For reading, flash is just memory, so just read it!
0 Kudos
Reply

446 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by m2babaey on Wed Jul 03 02:36:53 MST 2013
Yeah, it seems I have to use IAP to store my variables in flash
I just have 2 questions
1. Do I have to disable PLL before I enter IAP code
2. From user manual and other examples I understood how to write from RAM to Flash, but how can I read back from Flash to RAM? Somewhere was suggesting to use XDATA banking to read from flash and store it in RAM, but I couldn't understood how XDATA banking works and whther there is an easier solution for reading from FLASH
0 Kudos
Reply

446 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Mon Jul 01 23:54:57 MST 2013
AFAIK, that part does not have an internal EEPROM. Maybe that is why you can't find any information on how to use it...
0 Kudos
Reply