2023-02-06 02:31 PM
From RM0456-stm32u575585....
Flash section 7.3.8:
"... up to
256 Kbytes (32 pages) per bank feature an increased endurance of 100 kcycles, that can be used for data storage that usually needs more intensive cycling capability than code
storage. Any Flash page can be chosen to be cycled more than 10 000 times (up to 100 000 times). It is the application responsibility to limit the size of the Flash area cycled more than 10 000 times to 256 Kbytes per bank."
Perfect, 100k cycles is good for our use-case...
But I've been unable to find any registers, or any other documentation/notes/etc, that explain how to enable this, or how to select it, or really anything explaining it at all.
So.. How does this work?
And how do I enable this?
Solved! Go to Solution.
2023-02-09 01:57 AM
Hello,
I raised this post internally to the appropriate team for improving the docs.
Note that each Flash memory cell can be programmed and erased up to 100 000 times.
On STM32U5, can any Flash page be cycled more than 10 000 times?
Imen
2023-02-06 03:21 PM
Yeah, the description isn't very helpful
Kind of implies that there's some spare memory it can remap, or that out of the bank with 1MB you could build something that could support 256KB (1/4), but you might need some block management, and reallocation scheme.
@STOne-32
2023-02-06 03:23 PM
2023-02-06 04:18 PM
I mean, it seems they say the same thing in there again and again not explaining how to enable it..
And otherwise... yes. a Wear-leveling algorithm would otherwise work, but It'd also work better, if it was configured to also use the 100k-cycle thing... which is still unanswered.
(And yes, a ware-leveling algorithm does work too, but I don't really have the time to do that, nor integrate someone else's attempt of doing so)
2023-02-07 03:46 AM
My reading of the quote above is, that you don't need to perform wear leveling up to 100k cycles, as long as you stick to a handful of pages (namely 32).
The underlying reason may be, that while each individual FLASH cell can withstand 100k cycles with some reasonable resulting retention, the common HV source cannot withstand 100k cycles multiplied by number of all pages. Or anything else: I am not an ST insider.
Review also cycle-dependent parameters in DS.
JW
2023-02-08 06:45 AM
I don't think it is something you "turn on", but an exercise in statistics and probabilities, where a software based approach achieves this.
@Imen DAHMEN @Amel NASRI can someone get assigned to provide some app note or white paper related to this 100K cycle method, thanks.
2023-02-09 01:57 AM
Hello,
I raised this post internally to the appropriate team for improving the docs.
Note that each Flash memory cell can be programmed and erased up to 100 000 times.
On STM32U5, can any Flash page be cycled more than 10 000 times?
Imen
2023-02-09 02:36 AM
Thanks Imen,
Note also that the description will be improved a bit in the next version of RM0456 (see below).
And in practice, nothing to do on user side from a firmware standpoint. Any Flash page can be cycled up to 100 000 times provided that this is limited to 32 pages per bank.
Stéphane
7.3.8 Flash memory endurance
Each flash memory page can be written and erased 10 000 or 100 000 times. A maximum of
32 pages (256 Kbytes) per bank feature this increased endurance of 100 kcycles. This
enhanced endurance can be used for data storage that usually needs more intensive
cycling capability than code storage.
Any flash page can be chosen to be cycled up to 100 kcycles. As soon as a page is above
10 kcycles, it is considered as high cycling page (even if not yet at 100 kcycles). The
application must take care not to exceed 32 pages cycled more than 10 000 times.
2023-02-09 09:32 AM
Thank you for the rational of how it fails! It now makes sense and even gives further ideas of how to potentially increase reliability.
2023-02-09 10:17 PM
So, does this mean that if I don't need 100,000 cycles I could instead select 64 pages and only cycle them each 50,000 times (if the limit is that the [per-bank?] "charge pump" wears out after a total of N erase cycles and the flash cells themselves are all rated to 100,000 cycles)?
It seems like it would be better to list the total number of erase cycles allowed for each bank rather than try to break it down into a specific subset of pages.