Hi,

The attached patch makes the STRATA buffered programming algorithm
write the word count to the flash.
Also, it fixes a compilation issue in the diagnostics output.

Regards,
Edgar

-- 
Edgar Grimberg
System Developer
Zylin AS
ZY1000 JTAG Debugger http://www.zylin.com/zy1000.html
Phone: (+47) 51 63 25 00
Index: current/src/strata_aux.c
===================================================================
RCS file: 
/cvs/ecos/ecos/packages/devs/flash/intel/stratav2/current/src/strata_aux.c,v
retrieving revision 1.2
diff -u -r1.2 strata_aux.c
--- current/src/strata_aux.c    29 Jan 2009 17:48:27 -0000      1.2
+++ current/src/strata_aux.c    16 Oct 2009 08:27:26 -0000
@@ -234,7 +234,7 @@
     int             result  = CYG_FLASH_ERR_OK;
     int             retries;
 
-    sf_diag("addr %08x fc %d\n",addr, first_call);
+    sf_diag("addr %08x \n",addr);
     // Start the erase operation
     addr[0] = STRATA_COMMAND_CLEAR_STATUS;
     addr[0] = STRATA_COMMAND_ERASE;
@@ -350,7 +350,7 @@
     } while ((--retries > 0) && ((status & STRATA_STATUS_SR7) != 
STRATA_STATUS_SR7));
     
     // Now issue the count, data, and confirm the operation
-    addr[0]   = STRATA_SWAP(STRATA_PARALLEL((count - 1)));
+    addr[0]   = STRATA_SWAP(STRATA_PARALLEL(count));
     for( i = 0 ; i < count ; i++ )    
     {
         STRATA_TYPE val = STRATA_NEXT_DATUM(buf);
Index: current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/intel/stratav2/current/ChangeLog,v
retrieving revision 1.7
diff -u -r1.7 ChangeLog
--- current/ChangeLog   21 Apr 2009 15:40:08 -0000      1.7
+++ current/ChangeLog   16 Oct 2009 08:27:26 -0000
@@ -1,3 +1,9 @@
+2009-10-16  Edgar Grimberg  <[email protected]>
+
+       * src/strata_aux.c: Modified the word count to be written on the 
+       flash to match the number of words. 
+       Fixed the diagnostic output. 
+
 2009-04-21  Bart Veer  <[email protected]>
 
        * src/strata.c: Added set of parentheses around macro parameters

Reply via email to