we are planning to use stm32f4 discovery board in our satellite.we will have a code backup in the sd card.How to dump the code on to the Microcontroller when there is a code corruption.
Asked
Active
Viewed 7,620 times
2 Answers
2
You need to write a bootloader that has access to the SD card peripheral which will read the backup code off of the card and program the flash program space on the STM32 itself (assuming this is where you are running the code from).
There are plenty of resources on bootloading the STM32. Here are just a few

bizziedog
- 71
- 2
1
You need boot loader to do your work. You may choose to use the example boot loader that STM provided or your can write your own boot loader.
The flash you reserve for the bootloader must be a whole number of flash pages starting from the reset address , After that you will have to rebuild your application code for the new start address because current start address has bene taken by Bootloader.

Dheeraj Kumar
- 377
- 2
- 13