2022-02-17 01:00 AM
I'm reading TS and clearing TSF, ITSF, TSOVF flags upon power up. But when power cycle happens again, the TS registers are still containing the previous value, but not present value.
2022-02-18 11:00 PM
It looks like RDP mechanism is actually causing troubles in powering up.
2022-02-20 06:40 PM
Are the TSF/TSOVF flags set before you clear them? What are you using to trigger a timestamp capture?
2022-02-21 12:27 AM
TSF and ITSF are cleared by HAL GetTimeStamp function. I am not checking them explicitly. I am clearing OVF flag too as a precaution.
I am enabling ITSE flag at the time of calendar initialization. My understanding is that with this flag being set, TS registers will be updated when RTC power source is changed from VCC to VBAT. So when power cycle occurs, at the startup time I am expecting TS registers to contain the time when power last failed.
Am I missing something?