Skip to main content
antonius
Associate III
April 18, 2019
Question

RTC Init STM32L152RE

  • April 18, 2019
  • 2 replies
  • 569 views

Dear Members,

How can I save date and time setting on STM32L152RE ?

Everytime I have reset, it's initialized to the value on init code, how can I the value after power off ?

I put a battery on VBAT , it doesn't help,

Thanks

This topic has been closed for replies.

2 replies

After Forever
Senior III
April 18, 2019

How is your RTC clocked? Make sure the RTC and its clock (LSE or LSI) remain active when your MCU goes to sleep/stop/standby mode (RTCEN, LSEON, LSION bits in the corresponding RCC registers).

antonius
antoniusAuthor
Associate III
April 18, 2019

I'm using LSI, do I need to use LSE.

I completely power of the system...I put 3V battery on VBAT to make RTC keeps running.....

Any ideas ?