1
\$\begingroup\$

I have been trying to implement calendar functionality on my STM32f103C8 using the built in RTC peripheral.

Going through the RTC section of the reference manual, it states that the clock source to RTC can be either of HSE/128 or LSE or LSI. So far so good.

But then I found this regarding RTC in the RCC section

enter image description here

What do they mean by "RTC state is not guranteed if the Vdd supply is powered off..." when using HSE/128 as the RTC clock source? I was under the impression that as long as the BACKUP domain is not resetted (Vbat present if Vdd turned off), the RTC state would be maintained. Isn't that the whole point of RTC?

\$\endgroup\$
1
\$\begingroup\$

Yes, and if you use the LSE clock, everything is fine. This blurb is telling you that if you choose an alternate clock source for the RTC, such as HSE or LSI you will NOT be fine.

A lot of applications just need to keep track of runtime, and so don't have a 32k crystal or anything like that to maintain time across power cycles. For THOSE applications, LSI or HSE clock sources are adequate. It sounds like that's not a good way to go for you though.

\$\endgroup\$
  • \$\begingroup\$ Thanks Daniel. So if I understood it correct, if I use HSE os LSI, the only thing RTC is good for is to maintain time intervals during mcu operation. Once the mcu resets, rtc stops as there is nothing driving these clocks as they are not in backup domain. So then why have them as sources to RTC? To check for time intervals one can just use timers? \$\endgroup\$ – Ankit Mar 26 '16 at 9:23
  • \$\begingroup\$ "A lot of applications just need to keep track of runtime, and so don't have a 32k crystal or anything like that to maintain time across power cycles. For THOSE applications, LSI or HSE clock sources are adequate." \$\endgroup\$ – Daniel Mar 26 '16 at 17:10
  • \$\begingroup\$ Not to be too much of a dick, but if you're going to be working on this stuff, your english/reading comprehension could use some focus. \$\endgroup\$ – Daniel Mar 26 '16 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.