Page 1 of 1

Internal RTC of stm32f103 is not working with VBAT

Posted: Sat Mar 13, 2021 7:05 am
by itsDavid
Hello everyone, I am trying to use internal RTC of stm32f103 with vbat. Can anyone please help me regarding this? My rtc time is getting reset after every power down of VCC. I have connected a Coin cell in the vbat pin. How can I make the rtc to keep time?

Re: Internal RTC of stm32f103 is not working with VBAT

Posted: Sat Mar 13, 2021 8:58 am
by GonzoG
Have you changed clock source to LSE ??

Re: Internal RTC of stm32f103 is not working with VBAT

Posted: Sat Mar 13, 2021 11:58 am
by itsDavid
GonzoG wrote: Sat Mar 13, 2021 8:58 am Have you changed clock source to LSE ??

Yess I have done that

Re: Internal RTC of stm32f103 is not working with VBAT

Posted: Sat Mar 13, 2021 12:24 pm
by ag123
i'd guess if you are using the library,
https://github.com/stm32duino/STM32RTC
check your call to rtc.begin()
https://github.com/stm32duino/STM32RTC/ ... TC.cpp#L54