2009-08-02 06:10 PM
Flash memory question
2011-05-17 04:19 AM
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, Phil2011-05-17 04:19 AM
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.2011-05-17 04:19 AM
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.2011-05-17 04:19 AM
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.2011-05-17 04:19 AM
Got it,
Thanks, Phil