Hello, I am Firmware engineer working on STM32G07 series board. While working with Flash memory I have unprotected Flash from Read and Write using STlinkUtility v 4.5.0, after this I am not able to Erase the Flash and hence not able to Debug and load.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-05 12:42 AM
Hello I am Firmware engineer working on STM32G07 series board. While working with Flash memory I have unprotected Flash from Read and Write using STlinkUtility v 4.5.0, after this I am not able to Erase the Flash and hence not able to Debug and load as STM32 CubeIDe internally gives Erase command to clear Flash and Writes the new code on to board, Kindly suggest how can i fix this. see attached image for details.
Solved! Go to Solution.
- Labels:
-
STM32G0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-06 01:44 AM
Dear Shiv,
The Flash signature you present looks like you have PCROP activated on the part on block or all of the memory.
In order to disable it, go back to RDP level 1 and set PCROP_RDP bit in OB as well.
Hope it might help,
Regards,
Antoine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-05 12:57 AM
Dear SDesh,
May I ask you how you unprotected your flash? It should be by default in RDP level 0 and write unprotected. Did you try to connect to your device "under reset" ?
Thank you and regards,
Antoine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-05 03:59 AM
Hi Antoine,
I used the STM32 ST-Link Utility for unprotecting the Flash, from read & write in simultaneously. and did manual Reset to take changes into action
Regards,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-05 04:19 AM
Shiv,
You mean you modify option bytes of your target by a user interface like Cube Programmer? Or by a loaded firmware onboard?
Manual reset wont update option bytes setting, you must perform power sequence or OBLaunch to do so.
May you try to connect to your target under reset?
Thank you and regards,
Antoine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-05 04:44 AM
Hi Antoine,
Yes I have modified the Option-Bytes from Level 1 to level 0, and have unselected Pages for Write unprotect, After Applying the changes, I can see the Protection level is set to Level 0, but now while performing Mass Erase, Getting the Error, I am not able to see 0xFF but instead there is value 0x80 at every byte. So not sure why this occured.which if further creating problem for Flashing new Code. I hope I am Clear? or I can share the Images which might give some clue.
Please let me know if I can provide some more Images or info.
Regards,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-05 04:49 AM
Here is the Image of current Memory content. Not sure why there is this data at all locations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-05 04:57 AM
Use the STM32 Cube Programmer tools, the Utilities have been deprecated and might not pair well with the G0​
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-07-06 01:35 AM
Hi Tesla, Thanks you for your reply !!, I have downloaded the STM32 CubeProgrammer and tried to have a full Erase from it as well, but still its not able to Erase the flash, its giving the error to "Mass Erase operation failed, please verify flash Protection". Further tried to check for the Protection but both Read and Write Protection looks disabled, please see the images which can give some clue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-06 01:36 AM
Here is another image for error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-06 01:44 AM
Dear Shiv,
The Flash signature you present looks like you have PCROP activated on the part on block or all of the memory.
In order to disable it, go back to RDP level 1 and set PCROP_RDP bit in OB as well.
Hope it might help,
Regards,
Antoine
