cancel
Showing results for 
Search instead for 
Did you mean: 

Unwanted flash erase issue

Deepu joy
Associate II

Hi, 

I am using STM32L072CZT6 for my project. 

  1. The device operates in two stages: It wakes up at scheduled intervals, save the number of interrupts received to flash , and returns to standby mode. During standby, interrupts wake the device, the count is stored in the RTC backup register, and this cycle repeats until the next wake-up time. The problem arises after 10 or 20 wake-up cycles (in consistent) , leading to the undesired erase of flash memory . This issue occurs only when external interrupts are continuously received. The problem does not occur when the device is idle
  2. I am inquiring whether there is a connection between the erasure of flash memory and frequent wake-ups from standby mode( occurring, for example, every second) It's worth noting that I do not engage in any flash write operations during the standby mode switching cycle. 
3 REPLIES 3

Are you using Flash or EEPROM Emulation in your code? Which pages erase?

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

We are using Flash. 
Last four pages are used for saving some configurations. These pages are getting erased randomly. 

TDK
Guru

Wakeups do not cause flash erase. Likely there is an issue with your program logic leading to the erased flash pages, especially since erasing pages is part of your program. Perhaps show your code, or trace through your program logic to look for why this might occur.

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