Skip to main content
Graduate II
April 22, 2024
Solved

flash write versus erase cycles

  • April 22, 2024
  • 2 replies
  • 1930 views

Hi,

when I write 8byte block sequentially 256 times in 2kB page and then erase and start over what is the total number of writes I can do?

Datasheet describes 10000 write/erase cycles, but I do not erase after every write.

If the damage is cause by erase should the flash last longer with 1 erase per 256 writes?

can I write 256 times before erase is necessary or it would somehow degrade other cells sooner?

if there is a formula for write/erase damage ratio what is it?

I use stm32g071 but I expect this to be common use case.

 

    This topic has been closed for replies.
    Best answer by Andrew Neil

    take a look at this recent thread on the topic:

    https://community.st.com/t5/stm32-mcus-embedded-software/issues-with-x-cube-eeprom/m-p/662768#M46987

    TL;DR: It's the Erase that causes the wear - not writing.

     


    @PR.10 wrote:

    I use stm32g071 but I expect this to be common use case.


    Yes, it's a common property of all electrically-erasable PROM - not specific to STM32 or even to ST.

    2 replies

    Super User
    April 22, 2024

     should the flash last longer with 1 erase per 256 writes?

    > can I write 256 times before erase is necessary

    Yes and yes. 

     

    PR.10Author
    Graduate II
    April 23, 2024

    256x sound great, but it still does not explicitly defines the write limit:

    if write is the problem it would be still about 10256

    if they are equal it would be about 20000

    if only erase is the problem it would up to 2550000

    what is close to the reality for the internal flash?

     

     

    Super User
    April 23, 2024

    take a look at this recent thread on the topic:

    https://community.st.com/t5/stm32-mcus-embedded-software/issues-with-x-cube-eeprom/m-p/662768#M46987

    TL;DR: It's the Erase that causes the wear - not writing.

     


    @PR.10 wrote:

    I use stm32g071 but I expect this to be common use case.


    Yes, it's a common property of all electrically-erasable PROM - not specific to STM32 or even to ST.