2017-08-07 01:54 AM
Hello
I have a problem that I can not solve.
This applies to stm32f072.
I need to make a check if the processor has been powerless for more than 200ms at boot time.
Trying to use RTC and backup registry with milliseconds.
In the main loop, I save the clock in the backup registry.
And if there has been a voltage gap greater than 200 milliseconds, then errorflagga should be set.
The problem is that whatever I do, then the clock reads from the shadow register.
Have added
RTC-> ISR & = ~ RTC_ISR_RSF;
and
RTC_BypassShadowCmd
(
ENABLE
);
But this makes no difference.
Is there anything that knows how to solve this.
SIN Goran O