cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476VGT6 - RTC - Time after Reset

mejrissi
Associate II
Posted on September 15, 2016 at 15:58

Hi guys,

The project that I am doing needs the RTC clock to be working all the time.

When VDD = 0V I have VBat powering the RTC. When the MCU reboots, I need to know if the time indicated by the RTC is correct, or if the time indicated by the RTC is wrong (eventually because of a drop in VBat).

Is there a way to detect if the RTC is showing the right time after a reset?

I am working with a STM32L476VGT6  MCU.

Thanks in advance for your time.

#rtc #stm32l4 #vbat
2 REPLIES 2
Posted on September 15, 2016 at 17:09

Measure the battery voltage upon poweron. If it is below the voltage guaranteed to run the RTC, consider time as unreliable or outright wrong.

JW
mejrissi
Associate II
Posted on September 15, 2016 at 17:50

Thank you very much for answering my question waclawek.jan. This will do the trick.