2022-09-03 06:30 AM
Hi,
i'm needing to save the date and time on RTC backup register constantly (like once every second) in order to restore the saved time if the MCU was reseted, but im not sure if this registers could be written so constantly.
Solved! Go to Solution.
2022-09-03 06:57 AM
They are just SRAM, small array, and within the low power domain
2022-09-03 06:57 AM
They are just SRAM, small array, and within the low power domain
2022-09-03 08:15 AM
> in order to restore the saved time if the MCU was reseted
Just use the RTC main counters. RTC can even run from HSE, if that's what you need.
2022-09-03 08:26 AM
What's the point of reading back the time from some place if you can't know when that information was actually filed?
If the reset takes six hours (extreme example) because of a power failure during the night, for example, the time read back should be completely irrelevant, right?
Regards
/Peter
2022-09-03 08:45 AM
Well it's just a 32-bit counter, basing in on a 1970's epoch doesn't make a whole heap of sense.
But there are things like GPS which has a ~19 year (1024 week) roll over, and some time a useful characteristic of time is that it's doesn't go backward, here at least, so you can keep moving forward an earliest possible time marker so it can better manage whatever 19 or 68 year windows you're within.
2022-09-05 05:12 AM
Yes, that's right. I only considered small reset events for this case.
Thanks