cancel
Showing results for 
Search instead for 
Did you mean: 

how about the MCU using flash

ausera uirwaij
Associate III

0693W00000LzJQYQA3.pngI'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.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

> 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.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

8 REPLIES 8

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

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>

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..​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

> 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.

If you feel a post has answered your question, please click "Accept as Solution".
MM..1
Chief II

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 ...

Ok,Thanks.

Thank you.

Piranha
Chief II

Just read the AN3969.