Internal RTC STM32F1 - Want to store Time before RTC switches to VBAT
I am using STM32F103ZGT6
I have initialize code From STMCubeMx with settings-> PLL -ON , HSE -ON , LSE- ON for Internal RTC
I have written code to retain date for internal RTC. I want the event when RTC switches from VDD to VBAT , as per my application requirement I want to store Time at which power offs and Time at which power come , Accordingly I want show how many hr or min or sec power was off .
I have checked the Datasheet it is written that Power Down Reset(PDR) occurs when VDD shifts to VBAT I have tried with that flag in the code but didn't work
Can you suggest me some solution for this
