cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F051 RTC Vbat

farouk majdoub
Associate II
Posted on March 07, 2017 at 07:09

Hello

i have created my project with STM32 CubeMX and everything works like a charm, But i am stuck with the clock, i want to configure a RTC clock with Vbat pin to keep time running even if VDD power loss, apparently CubeMX configue only RTC, and doesn't configure Vbat pin or the register backup and ST doesn't provide any example for this.

Target MPU : STM32F051R8

I succeeded to get the RTC work with LSE but the time get lost when i remove the main power (VDD),

An example for RTC with register backup (vbat) for STM32F0 will be appreciated.  

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Nesrine M_O
Lead II
Posted on March 07, 2017 at 12:06

Hi

majdoub.omar

,

Please refer to RTC example under the STM32F0 firmware package:

STM32Cube_FW_F0_V1.7.0\Projects\STM32091C_EVAL\Examples\RTC\RTC_Calendar

-Nesrine-

View solution in original post

3 REPLIES 3
Nesrine M_O
Lead II
Posted on March 07, 2017 at 12:06

Hi

majdoub.omar

,

Please refer to RTC example under the STM32F0 firmware package:

STM32Cube_FW_F0_V1.7.0\Projects\STM32091C_EVAL\Examples\RTC\RTC_Calendar

-Nesrine-

farouk majdoub
Associate II
Posted on March 07, 2017 at 15:00

Perfect,after a little modification in the code, the clock works like expected.

Thank you

ELMHIRI.Syrine

,great help !

Posted on March 07, 2017 at 15:35

It is good to hear that it was solved.

If my suggest answers your question, please mark it as correct.