STM32_IAP demo.

Dependencies:   STM32_IAP mbed

Fork of IAP_internal_flash_write by Tedd OKANO

FLASH_wrtie_test EEPROM_write_test

Files at this revision

API Documentation at this revision

Comitter:
va009039
Date:
Sat Apr 30 05:20:59 2016 +0000
Parent:
9:ae7747b119c1
Commit message:
add Nucleo-L031K6

Changed in this revision

STM32_IAP.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r ae7747b119c1 -r f3e4dd858adb STM32_IAP.lib
--- a/STM32_IAP.lib	Mon Apr 11 20:18:58 2016 +0900
+++ b/STM32_IAP.lib	Sat Apr 30 05:20:59 2016 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/va009039/code/STM32_IAP/#a0c5bb26d159
+https://developer.mbed.org/users/va009039/code/STM32_IAP/#fd6a08b46228
diff -r ae7747b119c1 -r f3e4dd858adb main.cpp
--- a/main.cpp	Mon Apr 11 20:18:58 2016 +0900
+++ b/main.cpp	Sat Apr 30 05:20:59 2016 +0000
@@ -69,6 +69,15 @@
     }
 } sector_start_adress;
 
+#elif defined(TARGET_NUCLEO_L031K6)
+#define     TARGET_SECTOR    (0x7800/FLASH_PAGE_SIZE)
+#define     TARGET_EEPROM_ADDRESS   (DATA_EEPROM_BASE + 0x200)
+struct {
+    char* operator[](int sector) const {
+        return reinterpret_cast<char*>(FLASH_BASE + sector * FLASH_PAGE_SIZE);
+    }
+} sector_start_adress;
+
 #elif defined(TARGET_NUCLEO_F401RE)||defined(TARGET_NUCLEO_F411RE)||defined(TARGET_NUCLEO_F446RE)
 #define     TARGET_SECTOR    3
 struct {
@@ -165,7 +174,7 @@
 #endif
 
 
-#if defined(TARGET_LPC11UXX)||defined(TARGET_STM32L1) //  SAMPLE OF EEPROM ACCESS (LPC11U24 only)
+#if defined(TARGET_LPC11UXX)||defined(TARGET_STM32L1)||defined(TARGET_STM32L0) //  SAMPLE OF EEPROM ACCESS (LPC11U24 only)
     printf( "IAP: EEPROM writing test\r\n" );
     char    mem2[ MEM_SIZE ];
 
diff -r ae7747b119c1 -r f3e4dd858adb mbed.bld
--- a/mbed.bld	Mon Apr 11 20:18:58 2016 +0900
+++ b/mbed.bld	Sat Apr 30 05:20:59 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/99a22ba036c9
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/aae6fcc7d9bb
\ No newline at end of file