2021-02-22 09:13 AM
Hi
i would like to use the backup SRAM of the STM32F407 MCU to share boot flags between the bootloader and main firmware.
The flag should be used to signal a "boot into bootloader" requested by the main firmware.
To boot into the bootloader the main firmware will set the boot flag in the SRAM memory and afterwards execute NVIC_SystemReset() to perform a soft reset.
Is it necessary to enable the SRAM backup regulator if the MCU is only reset by a software reset while VCC stays stable ?
Is the backup SRAM powered from VCC as long as the backup SRAM regulator is disabled ?
Best regards
Yannic
2021-02-22 10:14 AM
JW
2021-02-22 12:46 PM
You can also use the SRam instead of BackupRam. You only need to allocate a dedicated section in LD file of both bootloader and app, so asm startup will not erase those variables. Be carefull, you also need to put attribut in C declaration of flags so they will be located in this New section. This code must not rely on C initialisation...
See resulting map file to be sure you got the correct mapping.