2025-07-07 3:14 AM
Hello,
I am working with the STM32G0B1CCT6 MCU and facing an issue while flashing firmware using ST-LINK.
During the flashing process, I get the following error:
I have checked my hardware connections, and power supply seems fine. However, the erase operation still fails, and the device disconnects.
Could this be due to flash write protection, or some RDP (Readout Protection) setting?
Please help me resolve this issue.
I am attaching the screenshot of the error and the related project/file for reference.
Thank you!
2025-07-11 3:07 AM
Hello @AKG123,
What is the value of RDP level?
Read, program and erase operations within the main flash memory area are possible with RDP Level 0.
Mass erase (full or partial) is only triggered by the RDP regression from Level 1 to Level 0. RDP level increase (Level 0 to Level 1, 1 to 2, or 0 to 2) does not cause any mass erase.
I recommend you reviewing RM0444 Rev 6 section 3.5 FLASH memory protection and verifying the erase conditions.
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.