Mass erase operation failed! Please verify flash protection
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.
- 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.
- 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.
- 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?
- 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?
