STM32F722ZE Error: Mass erase operation failed. Please verify flash protection. STM32F722ZE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-25 11:38 PM
I debuged my software on the STM32F722ZE, when I suddenly lost connection to it. I tried to connect to it with ST-Link V2 and Segger J-Link.
Error message from J-Link commander is: Can not attach to CPU. Trying connect under reset. Connecting to CPU via connect under reset failed.
Error message from ST-Link V2: Error finishing flash operation. Failed to erase memoy.
See picture: I then took a look at the config with CubeProgrammer:
How is it possible to have 0xFF as RDP Byte?
Write protection is not active are all checked.
When I try to perform a mass erase I get Error: Mass erase operation failed.
How can I recover from this? Is it possible that I locked myself our by acciedent? I would say it is rather unlikely to do this while debugging. What else could have happend?
Thank you in advance for every answer.
Solved! Go to Solution.
- Labels:
-
ST-Link
-
STM32CubeProgrammer
-
STM32F7 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-25 3:05 PM
I just encountered the same error when I was trying to do "Erase Chip" from within CubeProgrammer. I have the latest version downloaded yesterday. This was on the STM32H747-DISCO board with STLink-V3.
Error message: "Mass erase operation failed. Please verify flash protection" but no protection has been applied to any sector of the flash whatsoever. I did full chip erase/programming dozens of times yesterday, but suddenly today it didn't work out. After spending some time trying to figure out what happened, I found that the problem lies in the FW of the STLINK. One of the demo projects opened in the IDE asked me to upgrade its firmware, which I did. After that, the problem appeared.
Here's what I did to solve it:
1- Open ST-Link Utility
2- From ST-LINK drop down menu go to > Firmware update
3- Click on Device Connect
4- Make sure MCO output is set to "Default (HSI/2 8MHz)
5- Click "yes>>>>" to upgrade FW and restart the tool
That's it. Now, I can do full chip erase in both of ST-Link Utility and CubeProgrammer.
Zaher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-27 2:56 AM
Hello @yellowtomato​ ,
Let me first welcome you to the STM32 Community =)
I added the right topics to your question in order to increase its chance to be reviewed by our experts.
You might try updating the STLinkV2 firmware.
What is the release of Cubeprogrammer used ? Make sure to use and test with the latest STM32CubeProgrammer V 2.7.0.
Then, please keep me informed about your update.
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-27 7:05 AM
Hi @yellowtomato​ ,
Can you measure the power supply of the board ?
This behavior is typical when the VDD power supply is drops down.
Houda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-27 7:16 AM
Hello,
thank you for the welcome.
I already used STM32CubeProgrammer V 2.7.0. I updated the ST-Link to V2.J38.S7 and tested again. This did not change anything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-27 7:21 AM
Power Supply should be okay. I can not see it dropping down. I use the same powe supply for weeks now and before the issue I never had any problems with it. Should I measure the power supply at the MCU? Maybe something happened to the board.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-27 7:23 AM
Measure voltages at VDD, VDDA, and VCAP pins
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-27 7:24 AM
Hi,
yes exactly you should measure the the power supply at the MCU.
Houda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-28 12:17 AM
I measured this when the ST-Link was not attached: VDDA = 3.27V ; VDD= 3,27V ; VCAP = 1,221V
edit: should I message the what happens when I try to connect the debugger?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-16 8:40 PM
Hi, In continuation to the error I am using STM32L4R9I with macronix Octa flash and I am getting the same error "Mass erase operation failed." is their any feedback from ST team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-17 5:48 PM
MX25LM51245G has a RESET# pin. Please make sure this pin is in high stage.
