I am using an STM32F745VGT6 user board with Keil µVision 5. I want to use the internal RTC calendar with the internal clock (LSI).

My question is: first power on clock start 02:00:00 then time is going. For example, when time is 02:05:00 suddenly I power off the energy (cut off energy for Vdd, not for VBattery) then wait 10 minutes. After power on, the clock is still 02:05:00. I am stuck. It is so annoying.

I supply to uninterruptible 3.3 volt BIOS battery to STM 6.Pin (VBatt), as in the attached picture. If I remove the battery, each power off and power on start with 02:00:00. So I believe VBatt is working.

Battery circuit


I want to use internal RTC Calendar with internal Clock(LSI).

It's not going to work. From the Reference Manual

4.1.3 Battery backup domain

Backup domain description

To retain the content of the RTC backup registers, backup SRAM, and supply the RTC when VDD is turned off, VBAT pin can be connected to an optional standby voltage supplied by a battery or by another source. To allow the RTC to operate even when the main digital supply (VDD) is turned off, the 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)

The switch to the VBAT supply is controlled by the power-down reset embedded in the Reset block.

Unfortunately the LSI clock is not on the list, that's why it and the RTC stops when VDD is gone.


I want to use internal RTC Calendar with internal Clock(LSI).

I think that's why it doesn't work. According to the AN4759 Using hardware real-time clock (RTC) in low-power modes with STM32 microcontrollers, page 36/51 we can read the following statement :

Using the right power reduction mode

Depending on the application constraints, such as the maximum or average current consumption, the frequency of wake-ups, or alternatively the maximum wake-up time, several low-power modes can be used. The RTC peripheral can be active in the following low-power modes:

  • Sleep mode
  • Low-power Run mode
  • Low-power Sleep mode
  • Stop mode if the RTC clock is provided by LSE or LSI(a)
  • Standby mode if the RTC clock is provided by LSE or LSI
  • Shutdown mode if the RTC clock is provided by LSE(b)

Since you are using the LSI, the lowest power mode achievable for your RTC peripheral is the Standby mode. The shutdown mode is reached when you power off your system (even if you have VBAT connected), which is your case.

The fact that VBAT is connected allows you to keep the RTC value before shutting down the main power supply but here, the fact that you are using the LSI power off the RTC peripheral, that's why its value doesn't change.

If you want to achieve what you want (having the RTC working even when the main power supply is off BUT with VBAT connected), you have to use the LSE.


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.