cancel
Showing results for 
Search instead for 
Did you mean: 

Backup SRAM duration

AKara.9
Associate II

Hi STM,

I am having short question about BACKUP SRAM on STM32F437 MCU. 

So, for how long will BACKUP SRAM keep data, if power supply is removed. Will the data stay there, after some long period or will they be wiped out?

If they are going to be wiped out, should I expect to find some garbage there or wiping out means clearing SRAM - e.g. resetting it to some value (e.g. 0)?

Thanks,

Aleksandar

5 REPLIES 5

It is meant to be powered from a backup battery connected on the VBAT pin, so it maintains data as long as that battery provides a minimal voltage given by datasheet.

There is no mechanism which would "wipe" that memory.

JW

PS. Just to avoid any misunderstanding, this is a user-driven forum, with only casual ST presence.

AKara.9
Associate II

Thanks JW for the really prompt reply.

So in short, once power is back, I would find the data that were there at the time battery has some power?

Thanks,

Aleksandar

The battery is required to maintain the memory content.

If the battery fails or is disconnected at any time the main power is off, the memory content will be lost.

AKara.9
Associate II

Thanks Andrew,

What am I concerned with is initial state of memory after power is back - memory content is lost but... will there be some garbage or some meaningful values (e.g. all 0's)? I would then use status of SRAM to see if my battery went off.

Regards,

Aleksandar

What does the datasheet say? Is there any status register you could check?

In general (not specific to STM32), the contents of SRAM are undefined at power-up. So you need to provide some way to determine whether what's there is valid or not; eg,

  • Have some defined pattern with a very low probability of happening "randomly";
  • Have a checksum, CRC, or similar of your data - and check that.

This is general stuff - not specific to STM32; again, check the datasheet for any specific features that a particular chip may provide...