Skip to main content
mejrissi
Associate II
September 15, 2016
Question

STM32L476VGT6 - RTC - Time after Reset

  • September 15, 2016
  • 2 replies
  • 848 views
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
This topic has been closed for replies.

2 replies

waclawek.jan
Super User
September 15, 2016
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
mejrissiAuthor
Associate II
September 15, 2016
Posted on September 15, 2016 at 17:50

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