Flash Programming byte-by-byte

There has been a worrying change in the data sheet for the MSP Flash electrical specifications concerning parameter tCPT (Cumulative Programming Time). Once upon a time this used to be 3 mSecs for each block. In the current release it is 4 mSecs for each block but now additionally applies to ALL programming methods whether individual word/byte write or block write modes. This is bad news.

Flash write time Tword is defined in cycles, nominally 35 cycles.

At the shortest programming time (with max clock) 476kHz -> 2.1 uSecs per cycle. 35 cycles -> 73.5 uSecs. 4 mSecs contains just 54 of these 73.5 uSec periods ...

At the longest programming time (with min clock) 257kHz -> 3.89 uSecs per cycle. 35 cycles -> 136.2 uSecs. 4 mSecs contains just 29 of these 136.2 uSec periods.

This implies that even at the maximum clock only 54 writes are allowed to each 64-byte block before the Tcpt parameter is violated. This plays havoc with any schemes that use incremental sequential writes to minimise flash erase cycles. Not only that, but you can't even write 64 bytes to a 64-byte block, instead you have to write 32 16-bit words or some combination of bytes and words (or use block write mode from RAM).

(I originally sent this email to the MSP430 group).

Hugh

> Steve Underwood wrote:

> Chris Liechti wrote:
>
>> N. Coesel wrote:
>>
>>>> You can't program byte by byte. It has to be word by word.
>>>
>>>
>>>
>>> I wasn't shure whether it was word or byte. I took the wrong guess,
>>> but it
>>> doesn't really matter in respect to the context.
>>
>>
>>
>> you can program the flash in byte or word mode. i've used both.
>>
>> chris
>
>
> Isn't a byte write to this memory just a word write with one byte set
> to all ones?

To answer my own question... No. The flash can be written byte by byte
or word by word. I was getting confused with something else. Amongst my
own library of routines I have the following for 8 bit writes:

Regards,
Steve





Reply via email to