Skip to main content
YWilk.1
Associate
February 22, 2021
Question

STM32F407 Backup SRAM backup regulator needed ?

  • February 22, 2021
  • 2 replies
  • 789 views

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

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
February 22, 2021

0693W000007Z7xhQAC.pngJW

GLASS
Visitor II
February 22, 2021

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.