This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: STRATA v2 buffered programming fix
- From: Bart Veer <bartv at ecoscentric dot com>
- To: Edgar Grimberg <edgar dot grimberg at zylin dot com>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Fri, 16 Oct 2009 15:50:32 +0100
- Subject: Re: STRATA v2 buffered programming fix
- References: <d0f570ed0910160134n710c73adkd17ebeb81839d05a@mail.gmail.com>
>>>>> "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.