2022-07-05 09:53 AM
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
2022-07-05 10:04 AM
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.
2022-07-05 10:10 AM
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
2022-07-05 10:36 AM
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.
2022-07-06 01:07 AM
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
2022-07-06 04:11 AM
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,
This is general stuff - not specific to STM32; again, check the datasheet for any specific features that a particular chip may provide...