2022-04-28 12:39 AM
I'm wanting to save user data (less than 50bytes) and factory data (less than 100bytes) to internal flash, however the user data may changes everyday and it may overrun datasheet's 10 K erases and writes. So whether the MCU or the other flash sectors where saved main program will work well if the sector (such as sector 3 ) at which EEPROM emulate breakdown? I'm using STM32F42x.
Solved! Go to Solution.
2022-04-28 06:22 AM
> I may need get definitive answer about if MCU can work , which is involved in product design.
The chip is not guaranteed to work outside of the datasheet specifications.
2022-04-28 12:55 AM
The rest of the mcu will most probably continue to work, maybe with some insignificant increase in power consumption. I doubt you will get a formal guarantee for this from ST or any other manufacturer.
However, why would you *plan* on mcu damage, rather than design for survival? You don't need to erase/rewrite the whole page (which in 'F4 is huge) every time a small amount of data are rewritten - just keep writing within the page, using erased state (0xFFs) as an endmark, and erase only when page is full.
Other option is to add a cheap external serial EEPROM or FRAM.
JW
2022-04-28 02:13 AM
thank you.
I want to save a piece of EEPROM but don't lose reliability. I may need get definitive answer about if MCU can work , which is involved in product design.
your proposal are interesting.
>>just keep writing within the page, using erased state (0xFFs) as an endmark...
how do this in detail? I read the datasheet which writes requiring an
erase operation to free up space before data can be written again.<AN4894 Application note>
2022-04-28 02:28 AM
It is a method called journalling, you write new small chunks to an erased sector until full, thus decimating the erase cycles.
Not familiar with the concept perhaps look it up rather than get it reexplained, again..
2022-04-28 06:22 AM
> I may need get definitive answer about if MCU can work , which is involved in product design.
The chip is not guaranteed to work outside of the datasheet specifications.
2022-04-28 08:18 AM
Little match example: Use last sector 128ksize.
EEPROM emulating mode with 16bit addr plus 16bit data in one word write (32bit)
On initial erased all is FFFFFFFF ....
Your data to store need split to 16bit parts.
markering
#define VAR1 0xFF01
#define VAR2 0xFF02
#define VAR3 0xFF03
...
Store VAR1 plus 16bit data ...
Read search last VAR1 writed before FFFF.
Storage is 128k/4 16bit = 32k vars x 10k flashes = 320Milions rewrited 16bit vars.
After this sector maybe dead = you can use spare ...
2022-04-28 05:47 PM
Ok,Thanks.
2022-04-28 06:35 PM
Thank you.
2022-04-29 03:31 AM
Just read the AN3969.