Sample code for how to erase/write LPC1768, LPC11U24, LPC1114, LPC812 and LPC824 internal flash memory. This program uses IAP call of MCU's ROM routines. The IAP library also supports read/write of EEPROM in LPC11U24.

Dependencies:   mbed IAP

Sample code for how to erase/write LPC1768, LPC11U24, LPC1114, LPC812 and LPC824 internal flash memory. This program uses IAP call of MCU's ROM routines.

No filesystem interface available. This program is just an interface to flash erasing and writing. User need manage where to store the data in the flash area.

This IAP library supports read/write of EEPROM in LPC11U24.

More information available in
http://mbed.org/users/okano/notebook/iap-in-application-programming-internal-flash-eras/

Revision:
4:5705a494169a
Parent:
3:63a0993315e5
Child:
5:806960ca964e
diff -r 63a0993315e5 -r 5705a494169a main.cpp
--- a/main.cpp	Fri Jan 09 06:37:02 2015 +0000
+++ b/main.cpp	Tue Jan 13 09:11:47 2015 +0000
@@ -41,6 +41,7 @@
  *        revision 2.1  26-Nov-2012   EEPROM access code imported from Suga koubou san's (http://mbed.org/users/okini3939/) library
  *                                            http://mbed.org/users/okini3939/code/M0_EEPROM_test/
  *        revision 3.0  09-Jan-2014   LPC812 and LPC824 support added
+ *        revision 3.1  13-Jan-2014   LPC1114 support added
  */
 
 #include    "mbed.h"
@@ -50,7 +51,7 @@
 
 #if defined(TARGET_LPC1768)
 #define     TARGET_SECTOR    29     //  use sector 29 as target sector if it is on LPC1768
-#elif defined(TARGET_LPC11U24)
+#elif defined(TARGET_LPC11U24) || defined(TARGET_LPC1114)
 #define     TARGET_SECTOR    7      //  use sector  7 as target sector if it is on LPC11U24
 #define     TARGET_EEPROM_ADDRESS   64
 #define     TARGET_EEPROM_ADDRESS   64