cancel
Showing results for 
Search instead for 
Did you mean: 

Use backup register in VBat mode and also backup SRAM but not in VBat mode

lutztonineubert
Associate III

Hello everyone,

as the title says: Is it possible to use the backup register with an external battery so on power off the data persist. And also use the backup SRAM but on power off the battery should not be used here and all data will be lost.

We would like to use the backup SRAM only for information which have to be available on soft-resets like a restart after hard-fault and or bootloader/application.

Thank you and kind regards!

2 REPLIES 2

Which STM32?

> Is it possible to use the backup register with an external battery so on power off the data persist.

Isn't that the very purpose of the backup registers?

> We would like to use the backup SRAM only for information which have to be available on soft-resets like a restart after hard-fault and or bootloader/application.

You can use the backup SRAM for this purpose, but you can also use *any* SRAM for the same purpose - simply don't let the startup code to rewrite it. How exactly is this achiever, is toolchain-dependent.

JW

For example the STM32F439x.

> Isn't that the very purpose of the backup registers?

Yes, but we would also use the backup RAM in a slightly different way.

> You can use the backup SRAM for this purpose, 

Yes, we know. But the extra 4 Kbytes would be nice.