cancel
Showing results for 
Search instead for 
Did you mean: 

erasing data in flash stm32f3

dooz
Associate II
Posted on July 31, 2015 at 11:05

Hello,

I was wandering if there is a way to erase only one register in flash memory before writing to it instead of erasing the whole flash page which of course equals to loss of some previous written data?

It's not nice to download the whole fash page to some adjuvant structures and then add just one register to it because it takes some time.

Any ideas in this matter?

Regards

Dominik O.
3 REPLIES 3
Posted on August 05, 2015 at 12:56

Hi oziom.dominik,

Referin to the

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/reference_manual/DM00094350.pdf

 (page 49), the flash memory can be erased only page by page or completely (Mass Erase).

-Shahrzad-

Posted on August 05, 2015 at 13:49

One technique is to write multiple copies of the structure, and them walk through them to find the most current one, and when sufficiently full, erase the page and start over. This will also help wear-leveling, and reduce erase cycles.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
dooz
Associate II
Posted on August 05, 2015 at 16:10

Thanks clive1 and shahrzad for the answer. I somehow made it out by creating a buffer imitating a flash page. Every time it fills up Im just copying it to flash page. O course it's using some of the RAM resources but I can afford that

Regards

Dominik O.