cancel
Showing results for 
Search instead for 
Did you mean: 

Flash memory question

psd
Associate II
Posted on August 03, 2009 at 03:10

Flash memory question

5 REPLIES 5
psd
Associate II
Posted on May 17, 2011 at 13:19

Hi,

Does the flash memory in the STM32 have to be erased first before it is programmed (like with NAND flash chips) ?

If yes, does the ST bootloader do this automatically in its ''Write Memory'' command ?

Thanks,

Phil

st3
Associate II
Posted on May 17, 2011 at 13:19

It is a fundamental feature of all types of Flash that the write process can only change a bit value from '1' to '0'.

The only way to change a '0' back to a '1' is by the erase process.

psd
Associate II
Posted on May 17, 2011 at 13:19

Thanks,

I suspected that, but there is no mention of this in AN2606, so what I am really asking is:

Does the Bootloader ''Write Memory'' command do this or do I have to do it first with the ''Erase Memory'' command ?

Phil

PS: I think someone from ST will have to answer this for me.

16-32micros
Associate III
Posted on May 17, 2011 at 13:19

Hi phil,

Before using ''Write Memory'' command for an address inside the Flash, you have to ensure that the content of that address is 0xFFFF, either by issuing an ''Erase Memory'' command to the Page containing that address or if it has not been changed after the previous Erase.

Cheers,

STOne-32.

psd
Associate II
Posted on May 17, 2011 at 13:19

Got it,

Thanks,

Phil