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:
okano
Date:
Tue Mar 10 04:27:11 2015 +0000
Parent:
5:806960ca964e
Child:
7:41156dd69ab5
Commit message:
modified to handle new "iap.read_serial()" function.

Changed in this revision

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
--- a/IAP.lib	Fri Jan 16 08:00:33 2015 +0000
+++ b/IAP.lib	Tue Mar 10 04:27:11 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/okano/code/IAP/#cee1a2a734c9
+http://developer.mbed.org/users/okano/code/IAP/#c8bf974ecb33
--- a/main.cpp	Fri Jan 16 08:00:33 2015 +0000
+++ b/main.cpp	Tue Mar 10 04:27:11 2015 +0000
@@ -43,6 +43,7 @@
  *        revision 3.0  09-Jan-2015   LPC812 and LPC824 support added
  *        revision 3.1  13-Jan-2015   LPC1114 support added
  *        revision 3.1.1 16-Jan-2015  Target MCU name changed for better compatibility across the platforms
+ *        revision 3.1.2 10-Mar-2015  merged with pull requests. reinvoke_isp() added and modified read_serial() to return a pointer.
  */
 
 #include    "mbed.h"
@@ -69,10 +70,20 @@
 int main()
 {
     char    mem[ MEM_SIZE ];    //  memory, it should be aligned to word boundary
+    int     *serial_number;
     int     r;
 
     printf( "\r\n\r\n=== IAP: Flash memory writing test ===\r\n" );
-    printf( "  device-ID = 0x%08X, serial# = 0x%08X, CPU running %dkHz\r\n", iap.read_ID(), iap.read_serial(), SystemCoreClock / 1000 );
+    printf( "  device-ID = 0x%08X\r\n", iap.read_ID() );
+
+    serial_number = iap.read_serial();
+
+    printf( "  serial# =" );
+    for ( int i = 0; i < 4; i++ )
+        printf( " %08X", *(serial_number + i) );
+    printf( "\r\n" );
+
+    printf( "  CPU running %dkHz\r\n", SystemCoreClock / 1000 );
     printf( "  user reserved flash area: start_address=0x%08X, size=%d bytes\r\n", iap.reserved_flash_area_start(), iap.reserved_flash_area_size() );
     printf( "  read_BootVer=0x%08X\r\r\n", iap.read_BootVer() );
 
--- a/mbed.bld	Fri Jan 16 08:00:33 2015 +0000
+++ b/mbed.bld	Tue Mar 10 04:27:11 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/7e07b6fb45cf
\ No newline at end of file