cancel
Showing results for 
Search instead for 
Did you mean: 

I was getting the "Error in erase operation" in the loop every time. why?

AA.21
Associate II

Why was I getting the "Error in erase operation" message in the loop function when I stored the interrupt-based count in the memory at frequent intervals or continuously given the interrupt at 50ms once?

I've provided the image below that shows a serial port error:

0693W00000WJZKlQAP.png

3 REPLIES 3
Imen.D
ST Employee

Hello @AA.21​,

Which board are you using?

Can you measure the power supply of the board? measure the voltages at VDD, VDDA, and VCAP pins?

Are you using an external or internal Flash Erase?

Try updating the STLinkV2 firmware and make sure to use latest release of the tools.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hi @Imen DAHMEN​ 

I didn't do any erase operation in that case. I have just stored the interrupt count in the flash memory.

I used TTL convertor for flashing the firmware in the stm32 controller.

Piranha
Chief II

Storing without an erase and doing it at 50 ms intervals... If you intend to just write a single memory location at such a rate, you will wear out the guaranteed FLASH erase-write cycles in 8 minutes. Read the datasheet and the reference manual to understand how the FLASH memory works!