AnsweredAssumed Answered

STM32F411RE - RTC and VBAT

Question asked by Teddy Bonkers on Jul 20, 2015
Latest reply on Jul 20, 2015 by Clive One
Hello

I have been trying to get the RTC to work with VBAT. I have connected 3V coin cell battery to the VBAT pin (RTC initialized beforehand). I test if RTC is working in the following way:
if((RTC->ISR & RTC_ISR_INITS) == 0) {
    MX_RTC_Init();
} else {
     
}
When I run the code (again, RTC is supposed to be initialized), the condition shows that RTC has in fact been initialized, which is confirmed by debugging too. But when I try to otuput the current time, I get constant value which is not changing.

When I initialize RTC in the beginning of my code, it works as expected. I need to be able to keep it going with VBAT though. Any help is welcome.

Thanks

Outcomes