cancel
Showing results for 
Search instead for 
Did you mean: 

How to wipe the flash memory of an STM32L476RG

20adamsjac
Associate II

Hi all,

I am working on a research project for my school that involves me programming a microcontroller, however, the program that I most recently flashed to my board causes the processor to quickly heat up and cause a burning smell. I am unsure if the board is damaged yet but I would like to be able to wipe the program without plugging it in so that I can prevent further damage to the board. Is this something that is possible with the STM32L476RG? I am using Keil uVision5 to program my board if that is relevant.

6 REPLIES 6
Pavel A.
Evangelist III

Is your board custom or some ST eval. board? Is it possible to connect a debugger to it (ST-LINK, J-Link...)?

STTwo-32
ST Employee

Hello @20adamsjac and welcome to the ST Community 😊.

I suggest you connect your board to Cube Programmer (using ST-LINK for exemple) and do a full chip erase. 

Best Regards.

STTwo-32 

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.

Thank you for the response! I would try and wipe the memory on a debugger but the processor gets hot enough to burn me within about 10 seconds so I am not sure that I would have enough time to try and wipe the flash through software.

Pavel A.
Evangelist III

*If*  you're sure that the problem is caused by recent firmware update (not by some other change on the board, shorting something...): as soon as the debugger connects *under reset* - the MCU resets. All pins go to their default state. The MCU remains halted. If the "malicious" code causes overheating, in this halted state it should not heat. Then you can proceed with wipe. Otherwise the program is not the culprit and things would become worse ((

Sounds like the damage is already done and perhaps not related to code you loaded. Is it driving external circuitry that might apply higher voltages, or was something shorted out.?

Best I can suggest is to find a BOOT0 pin, and connect that to 3.3V / VDD so it doesn't boot YOUR code, giving you the opportunity to erase it safely.

Is this a NUCLEO or DISCO board, or some custom board?

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

Thank you to everyone who replied! Based on these replies and my playing with the board I do believe it is shorted so I think my course of action at this point will be to buy another cheap nucleo board and learn from my mistakes.