Erik - / FreescaleIAP

Dependents:   18_PT1000 RDA5807M-FM-Radio flashaccess TF_conops_BAEFLAGIMAN ... more

Files at this revision

API Documentation at this revision

Comitter:
Sissors
Date:
Wed Mar 16 20:19:18 2016 +0000
Parent:
9:7502b2ac21c2
Child:
11:ab8a833a25eb
Commit message:
Whoops, was per 16-byte, not 8-byte

Changed in this revision

FreescaleIAP.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/FreescaleIAP.cpp	Wed Mar 16 20:09:08 2016 +0000
+++ b/FreescaleIAP.cpp	Wed Mar 16 20:19:18 2016 +0000
@@ -2,7 +2,7 @@
 
 #ifdef TARGET_Freescale
 
-//#define IAPDEBUG
+#define IAPDEBUG
 
 #ifdef TARGET_K64F
 //For K64F
@@ -188,10 +188,10 @@
         return AlignError;
     
     #ifdef USE_ProgramPhrase
-    //Check erase is per 8 bytes, we round up
-    length = (length + 7) >> 3;
+    //Check erase is per 16 bytes, we round up
+    length = (length + 15) >> 4;
     #else
-    //Otherwise per 4 byte
+    //Otherwise per 4 byte (should check if this is true)
     length = (length + 3) >> 2;
     #endif