-3

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.

Nandan
  • 11
  • 1
  • 2

2 Answers2

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

STM32 microcontroller system memory boot mode

Make own bootloader for Arm Cortex-M3

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