STM32 RTC freeze when power is off
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.