cancel
Showing results for 
Search instead for 
Did you mean: 

Error: failed to erase memory

ksale.1
Senior

I've stm32H750B-DK discovery board and when debugging I get this error at first debugging attempt , I then press the reset button several times before the download is successful. (pressing the reset button is not guaranteed to solve the problem, I still get the error in this case). Is this a sign of a bigger problem HW or SW?

1 ACCEPTED SOLUTION

Accepted Solutions

So why did you marked the topic as answered if you didn't get to the solution?

And are you capable of using the internet?

https://i.stack.imgur.com/8YIAZ.png

View solution in original post

6 REPLIES 6

Tends to me more indicative of the tools and the settings.

ie Connect Under Reset might be a more effective means of getting control of the MCU initially.

There are things you can do in software that interfere with debugger connectivity.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thank you @Community member​  Can you give me guidance where to look. It is very annoying error.

So why did you marked the topic as answered if you didn't get to the solution?

And are you capable of using the internet?

https://i.stack.imgur.com/8YIAZ.png

I always admire @Community member​ grasp of the issues and I am always excited when he has something to say. At least I understand now the nature of this beast. However, I was hoping for a sequel from @Community member​ . Thank you @Piranha​ for the link.

@Piranha​ , I must admit the image of the debugger config has nailed the problem, thank you

Low power modes, or switching off the pins/logic involved with the debugger will cause issues

Watch for reconfiguration of PA13, PA14 and PB3. If you're not strapped for pins perhaps avoid using these.

Watch also PC13,PC14,PC15, these are typically in the low power domain. If not using for OSC32, consider use as inputs.

You can configure modes of connectivity/reset, along with speeds.

ST-LINK/V3 you want high quality cables, and direct connections.

I would avoid going through hubs of docking stations, as the retry/recovery afforded by the drivers and device aren't particularly robust. Had repetitive issues with STM32 Cube Programmer and External loaders, where it might have 10-15 minute connections reading/verifying 128-256MB images.

I've found Keil to be far less problematic than GDB and ST tools.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..