Skip to main content
psd
Associate II
August 3, 2009
Question

Flash memory question

  • August 3, 2009
  • 5 replies
  • 1048 views
Posted on August 03, 2009 at 03:10

Flash memory question

    This topic has been closed for replies.

    5 replies

    st3
    Associate III
    May 17, 2011
    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
    psdAuthor
    Associate II
    May 17, 2011
    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

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

    Got it,

    Thanks,

    Phil

    16-32micros
    Associate III
    May 17, 2011
    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
    psdAuthor
    Associate II
    May 17, 2011
    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.