Skip to main content
AA.21
Associate III
November 27, 2022
Question

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

  • November 27, 2022
  • 2 replies
  • 1956 views

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

This topic has been closed for replies.

2 replies

ST Technical Moderator
November 28, 2022

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
AA.21
AA.21Author
Associate III
November 28, 2022

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
Principal III
November 29, 2022

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!