Search code examples
cmicrocontrollerstm32f4discoverystm32f4

Flash downloaded code into STM32F4 MCU; how do I remove the downloaded code?


I'm new embedded electronics and am learning via online tutorials. I built and downloaded a code (with the uVision IDE) which made the blue and orange LEDs flash. I want these LEDs to stop flashing, and I want the MCU to go back to the state it was at before I downloaded the code. How would I do that?


Solution

  • If I am not mistaken, You want to erase your micro-controller.

    • For STM32 you have different options, If you are using ST-LINK, I think the best solution would be "STM32 ST-LINK UTILITY" which you can download here

    • Or you can use built-in Bootloader which can be enabled by BOOT pins and so on.

    • And you can also use your development environments such as IAR, KEIL or something like that.

    Additionally, Never worry about the downloaded program, you can always erase your application even you enabled the read-out protection option.