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
2025-01-23 07:32 AM
Hello, I have a related question.
After wake-up by RTC, I want to set time again if it drifted from accurate values.
But when I try to set new time it returns error.
So how to set new time values after reset?