cancel
Showing results for 
Search instead for 
Did you mean: 

cannot debug with CUBEIDE "Error: failed to erase memory"

OWLchan
Associate III
hi i am having a problem with my stm32cubeide, specifically i cant connect to the stm32f407vgt6 microcontroller on my custom board, but when loading or erasing with cubeprog everything goes smoothly.
i have tried cleaning my board, updating stlink to v2j45f7, reinstalling stm32cube1.15 since i previously updated to 1.16. still nothing works.
can anyone help me?
Screenshot 2024-11-16 162113.png
 
Screenshot 2024-11-16 162215.png
 
edit : this my log debug 
2 REPLIES 2
Ghofrane GSOURI
ST Employee

Hello @OWLchan 

First let me thank you for posting.

Here are several troubleshooting steps to consider:

USB Port and Cable:
Try using a different USB port or cable to rule out any connectivity issues related to hardware.
Custom Board Design Review:
If possible, review the schematic and layout of your custom board for any design flaws that might affect connectivity.
Test with Another Board:
If available, test with another STM32F4 board or a different STM32 microcontroller to determine if the issue is specific to your custom board or a broader problem with the IDE.

Reinstall STM32CubeIDE:
Since you've already reinstalled version 1.15 after issues with version 1.16, consider a complete uninstall followed by a fresh install to eliminate any potential corruption in the installation.

STM32CubeIDE Configuration:
In STM32CubeIDE, ensure that the correct target device (STM32F407VGT6) is selected in your project settings. Also, verify that the debug configuration settings match your hardware setup.

hi, thanks for last week's question, sorry for not replying you earlier, but the good thing is that I solved my problem completely, basically I got another stlink to use and it has no problem anymore.

but I wonder why the old stlink with target voltage of 3.23v can debug or use normally with stm32f103c8t6 chip but cannot debug for stm32f407vgt (must use another stlink with target voltage between 3.57,-4.5v to debug and use normally)? Screenshot 2024-11-24 084644.png

 

 

Screenshot 2024-11-24 084826.png