Skip to main content
Associate
November 12, 2023
Question

How to wipe the flash memory of an STM32L476RG

  • November 12, 2023
  • 6 replies
  • 2647 views

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.

This topic has been closed for replies.

6 replies

Pavel A.
November 12, 2023

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

Associate
November 12, 2023

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.

STTwo-32
ST Technical Moderator
November 12, 2023

Hello @20adamsjac and welcome to the ST Community :smiling_face_with_smiling_eyes:.

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.
Pavel A.
November 12, 2023

*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 ((

Tesla DeLorean
Guru
November 12, 2023

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
Associate
November 13, 2023

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.