cancel
Showing results for 
Search instead for 
Did you mean: 

RTC stops during power off

Johanan1
Associate II
Posted on October 24, 2014 at 15:25

RTC runs on LSI, with battery. It keeps the data when power is off, but stops counting.

When power is reconnected, the time is the last time before power off, and start counting from there.

What am I missing?

Thanks

Johanan

#stm32f4
7 REPLIES 7
chen
Associate II
Posted on October 24, 2014 at 15:41

Hi

I believe the RTC will only work off the LSE osc when running off a battery.

Posted on October 24, 2014 at 17:28

RM0090 rev.7, ch.5.1.2 Battery backup domain:

 VBAT pin powers the following blocks:

• The RTC

• The LSE oscillator

• The backup SRAM when the low-power backup regulator is enabled

• PC13 to PC15 I/Os, plus PI8 I/O (when available)

So, as Sung Chen Chung said above, LSI is not powered from VBAT pin, thus stops during VDD down.

JW

Johanan1
Associate II
Posted on October 24, 2014 at 19:47

Thank you both.

I could not run LSE, but I think it is that my Xtal has 12.5 pF capacitance load. Will get a 6 pF soon and check.

Johanan

Posted on October 24, 2014 at 19:55

> I could not run LSE,

Note, that LSE tends to start up slowly, it may take up several seconds (!) to get it to oscillate properly. So, if your LSE startup code has a timeout and it's too short, you miy get the false impression that LSE doesn't want to start.

Of course, the load capacitors together with the parasitic capacitance of the pins have to match the crystal's characteristics.

JW

Johanan1
Associate II
Posted on October 24, 2014 at 20:20

Never in my life I spent so much time trying to run an RTC in a micro-controller. Actually I spent more time on this then on the SDRAM and Nor Flash  FMC.

And it still does not work as I don't have the right xtal at hand.

Amel NASRI
ST Employee
Posted on October 27, 2014 at 11:50

Reminder:

https://my.st.com/public/STe2ecommunities/mcu/_layouts/ST/MYSTForum/CodeOfConduct.aspx

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Johanan1
Associate II
Posted on October 28, 2014 at 20:57

Corrective action taken.

Thank you :)