This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: STRATA v2 buffered programming fix


>>>>> "Edgar" == Edgar Grimberg <edgar.grimberg@zylin.com> writes:

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

@@ -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);

Are you sure about this? A quick look at a Strata datasheet (28F640K3)
shows the following:

  "Next, a word count (actual word count - 1) is written to the device
  at the buffer address. This tells the device how many data words
  will be written to the write buffer, up to the maximum size of the
  write buffer. The valid range of values for word count is 0x00 to
  0x1F."

So the (count - 1) in the current code looks right to me.  

Bart

-- 
Bart Veer                                   eCos Configuration Architect
eCosCentric Limited    The eCos experts      http://www.ecoscentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]