cancel
Showing results for 
Search instead for 
Did you mean: 

RTC Init STM32L152RE

antonius
Senior

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

2 REPLIES 2

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
Senior

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 ?