cancel
Showing results for 
Search instead for 
Did you mean: 

Mass erase operation failed! Please verify flash protection

a_user
Associate II

We have made a batch of 30 boards using the STM32U073. One of this 30 boards is not working as expected.

I am able to connect STM32CubeProgrammer to the processor using the SWD port. I am using STM32CubeProgrammer v2.18.0. If I try and erase the flash I get ”Error: Mass erase operation failed! Please verify flash protection”.

Using the OB – Option Bytes page I see the following.

RDP = AA
WRP1A_STRT = 0x7F
WRP1A_END = 0x0
WRP1B_STRT = 0x7F
WRP1B_END = 0x0

This looks like RDP is level 0 (no read protection) and the two write flash areas are unprotected.

  1. What steps using STM32CubeProgrammer will allow me to erase then program the flash?

I do not know if the following is related but I noticed the following while investigating this issue.

  1. In the bottom right corner of STM32CubeProgrammer there is target information. With a working part the “Bootloader Version” is reported as 0x1. With the failing part the “Bootloader Version” is reported as 0xFF. The other fields in this box match.
  2. On the OB – Option Bytes page there is a BOR_LEV field. The working part this is 6 and the failing part this is 4. The description of this field and the combo-box do not include level 6. Page 94 of RM0503 Rev 2 also does not describe a level 6. What does level 6 indicate?
  3. On the Reg – Registers page in the FLASH_SR register is “RDERR : bit [14]”. Page 88 of RM0503 Rev 2 does not describe this bit. Is there a description of this bit?
4 REPLIES 4
TDK
Guru

If 1/30 isn't working, probably more likely to be a hardware issue than a software configuration thing. The error message is telling you something went wrong but is just guessing at the cause. In any case, it seems way more likely to be a manufacturing issue with the board than for the FLASH on the chip to be programmed incorrectly.

Can you verify soldering on the chip? Verify VDD level. Is current draw the same as other boards?

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

Hi,

I would just tell to you, having experienced a such memory mass erase you should take care about which memory you want to erase. A mass erase, erase all the NVM including system memory. If you want just erase the NVM where you expect to store your application, this is the application memory, you should see in software parameters.

My own experience is making a mass erase, I loose a Nucleo board, loosing all system functioality including boot loader.

A counter solution is to erase the application memory page by page. For my own need this is an application which can be develloped through the Bootloader.

Wishing this information, can help.

Butterfly.

 

> A mass erase, erase all the NVM including system memory

This is just plain horse hockey (not true).  Mass erase does not erase system memory (i.e. the built-in bootloader).

 

Hi, I'm really enjoyed with your joke.

I can testimony I did a mass erase through the boot loader, and I wasn't able to use my Nucleo board, after this mass erase.

Then, the subject of my mail was just to pay attention, which kind of memory you want to use as target. The NVM being separate between several objects, a mass erase, erase all objects.

Regards.

Butterfly.