2025-06-12 2:53 AM
Hey everyone,
I'm working on a custom board based on the STM32H753 MCU. I successfully programmed it using STM32CubeIDE initially, but ran into an issue when trying to re-flash it — I got the error:
"Unable to erase flash memory to reprogram it"
To work around this, I connected to the board using STM32CubeProgrammer and performed a full chip erase using the following settings (details below). I clicked Apply, and the flash erase appeared successful.
After erasing, I’m no longer able to connect to the board via either Cube IDE or Cube Programmer. I now get:
"Unable to get the core ID"
Debug Interface: ST-Link external
Board was connecting and programming before the flash erase
Now completely unresponsive via SWD.
Does full flash erase wipe the area that contains the boot/configuration code, preventing debug access?
What hardware signals should I verify?
Is there a way to force the MCU into a recoverable mode
I will also share the schematics
This is not exactly the same as my previous post where the MCU was never detected at sudden. In this case, it was working, but the issue started after a successful erase
Solved! Go to Solution.
2025-06-23 6:48 AM
@TDK wrote:If you set RDP 2, you can no longer access the chip with STM32CubeProgrammer. There is no way to recover the chip. It's done. Replace it with another chip.
ok fine as of now i set this as the solution since we have our development board in developing condition the protection is set to level 2. we're helpless to access the flash so for our case it might be the reason behind this.
2025-06-12 6:03 AM
Hello @santhosh16;
Are you using STM32F410 or STM32H7? The two screenshots shared different devices.
If the RDP level is set to "CC" level 2 (device protection and intrusion prevention), the below rules apply:
• All debugging features are disabled.
• Like level 0, all read/write/erase operations from/to the user flash memory are allowed
since the debugger and the boot from RAM and System flash memory are disabled. Accesses to the other secured regions are also allowed.
• Booting from RAM is no more allowed
Which STM32Cubeprogrammer version are you using?
Please download the latest version of STM32CubeProgrammer.
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.
2025-06-12 6:12 AM
If the flash is erased and you can't connect, the hardware is likely damaged or the wiring between the chip and your programmer is bad. However:
If your screenshot, it looks connected to me. Says it's connected. Says memory has been read. Flash content is there and does not appear to be erased.
2025-06-12 7:34 AM
No, the above the "data read successfully" message you can find an issue of core id got erased. the flash content shown for an other board to check whether that board is getting connected.
2025-06-12 10:07 PM - edited 2025-06-12 10:08 PM
Hi @KDJEM.1,
Like level 0, all read/write/erase operations from/to the user flash memory are allowed
since the debugger and the boot from RAM and System flash memory are disabled. Accesses to the other secured regions are also allowed.
how can i access to user flash memory then and how to boot will occur without the access of system memory
which have bootloader
2025-06-13 3:26 AM
Hello @santhosh16 ;
Thank you for updating post.
When the Flash level 2 protection is enabled, only boot from Flash memory is available.
When level 2 is activated, the level of protection cannot be changed back to level 0 or level 1.
Please refer to RM0433 section 4.5.3 Readout protection (RDP) for more information about the RDP level.
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.
2025-06-13 6:39 AM
Your post says you erased the flash, but your screenshot shows you set RDP level 2. Which one is it? They are very different operations.
2025-06-17 7:26 AM - edited 2025-06-17 7:27 AM
Hello @TDK and @KDJEM.1 One of our collegue done this. By sending these screenshot he said that the core id is becomes zero after this. so we try to solve this from his point of view. From this post we came to know that we have just upgraded the protection level of the board. Now our board is in developing condition. Since it's impossible to set the rdp level again to 0 and connecting using st-link also not possible. then how to boot the flash in which protocol?.
2025-06-17 8:08 AM
If you set RDP 2, you can no longer access the chip with STM32CubeProgrammer. There is no way to recover the chip. It's done. Replace it with another chip.
2025-06-19 6:55 AM
but @KDJEM.1 said it can be booted from flash memory kindle help me with that process and also one of my colleague suggest to changing the boot0 pin to high and then reset might be works. I will try it and if it works then put that as the solution.