Skip to main content
Associate II
January 15, 2024
Question

Unwanted flash erase issue

  • January 15, 2024
  • 3 replies
  • 1357 views

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. 
This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
January 15, 2024

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

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Deepu joyAuthor
Associate II
January 15, 2024

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

TDK
January 15, 2024

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