2020-09-23 11:34 PM
In my application, I have a watchdog timer that resets every 45 seconds if not fed. I also have an RTC. The application records sensor samples, along with timestamps from the RTC.
Problem is, when there is a watchdog reset, the RTC is re-initialized to default date and time. This messes up the sample/timestamp collection.
Thanks.
Solved! Go to Solution.
2020-09-24 12:08 AM
Which STM32?
> Are the RTC time/date values still maintained even when there is a watchdog reset?
Yes. Your problems are caused by using Cube.
> Would it make sense to skip setting the default date/time when a watchdog reset has been detected?
Yes. You need to detect, if RTC is already set - see RTC_ISR.INITS flag - and act accordingly.
JW
2020-09-24 12:08 AM
Which STM32?
> Are the RTC time/date values still maintained even when there is a watchdog reset?
Yes. Your problems are caused by using Cube.
> Would it make sense to skip setting the default date/time when a watchdog reset has been detected?
Yes. You need to detect, if RTC is already set - see RTC_ISR.INITS flag - and act accordingly.
JW
2020-09-24 12:15 AM
STM32L4
Thanks. I just tested this out and it worked. The RTC values are maintained even with a watchdog reset.
Just needed to be absolutely sure.
Tim