cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with RTC

Goran Overgaard
Associate
Posted on August 07, 2017 at 10:54

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

0 REPLIES 0