Backup SRAM duration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-05 9: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
- Labels:
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-06 1: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-06 4: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,
- 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...
A complex system designed from scratch never works and cannot be patched up to make it work.
