Skip to main content
LSmit.5
Associate
June 26, 2019
Question

STM32F031 Flash memory cycles 10k exceeds? what will happen? is this value correct in the manual? some MCU have 10 to the power 15 cycles.

  • June 26, 2019
  • 8 replies
  • 3101 views

This Question is related to STM32F031xx MCUs and about the Flash memory endurance.

The official document states in chapter 6.3.10 Memory characteristics, that the endurance is Nend = 10k cycles.

-But isn't that very low number amount of cycles? I can imagine that some paramers storage logarithms can easily reach this amount.

-What will happen to the MCU when only one address exceeds the N(end-min) of 10k cycles? is it guaranteed that MCU will keep functioning? what if it keep writing to this adress?

-this concern is only related to parameters that is stored during lifetime and only purpose to read when the product would be returned to the factory.  

This topic has been closed for replies.

8 replies

waclawek.jan
Super User
June 26, 2019

> some MCU have 10 to the power 15 cycles.

Surely not for FLASH.

FLASH in some other mcus have endurance given as 100 cycles.

Endurance (and retention) are a complex issue, but generally you get better endurance/retention with larger FLASH cell, i.e. smaller memories and larger = more expensive chips.

> What will happen to the MCU when only one address exceeds the N(end-min) of 10k cycles? is it guaranteed that MCU will keep functioning?

Most likely it is only that given address which will experience lowered retention, i.e. it will "forget" more rapidly (note, that this *is* actually documented in that very same table, for 10k writes and 85 degrees). However, depending on the particular construction of the FLASH, It may impact neighbouring FLASH cells, if you exceed the endurance value in a significant way.

JW

LSmit.5
LSmit.5Author
Associate
June 28, 2019

Thanks for your answer. Then I need to search for MCU with different type of memory, since i guess this STM32F031 doesn't included EEPROM/FLASH memory with cycles upto 200.000times? the memory for this chip should only be used for the firmware logic i think.

Uwe Bonnes
Chief
June 26, 2019

This is a minimum value at extrem ambient confitions. Each flashing cycle will wear out flash and it will get more and more unreliable. But a sensible design will not hope that the real number of cycles reachable is higher than the number given in the datasheet. You will not find any flash that guarantees substantial more cycles.

Use other kind of non-volatile storage, like EEPROM, battery buffered RAM or NVRAM for such often written parameters or think about other approaches, like keeping in the parameter in RAM with a pre-powerfailure interrupt and writing to flash with this interrupt. Beware also, that flash needs to be erased first, with erase happening on chunks (pages/sectors)

LSmit.5
LSmit.5Author
Associate
June 28, 2019

Thanks, you explain about the "RAM with a pre-powerfailure interrupt and writing to flash with this interrupt", how save is this process, so it notice power down and tries to store parameters in flash quickly?

Ozone
Principal
June 28, 2019

As Uwe Bonnes mentioned, 10k is the worst case number, guaranteed at maximal temperature.

For each 10°C you go lower, you can expect an increase in one order of magnitude. Giving several million cycles at room temperature.

The is a nice app note available my Microchip, which incidentally produces Flash chips as well. Can't find it myself at the moment ...

> Thanks, you explain about the "RAM with a pre-powerfailure interrupt and writing to flash with this interrupt", how save is this process, so it notice power down and tries to store parameters in flash quickly?

IMHO not a very good idea.

Erase and program takes quite a long time (especially erase), and increases power consumption.

You could try to design enough power reserve (large buffer caps), and do an "emergency programming". But for one thing, the worst case timing for erase/program are usually excessive, and second, electrolyte caps tend to age very fast, and loose capacity.

A former company of mine tried this - with the expected elevated rate of field returns ...

LSmit.5
LSmit.5Author
Associate
June 28, 2019

Still wondering about what all could happen to the flash if some bits/bytes/sectors/pages/flash/mcu start to fail. Upto which point the MCU starts to mallfunction?

Or like I currently understand is the retention-years will decrease for every Flash erare/write cycle.

And if rentention occurs the bit will go from 1 to 0 and therefore some values in the memory become corrupted and the program could fail because of the programmed LOGIC doesn't expect and introduces more and more flaws/bugs.