Skip to main content
HAkba
Visitor II
April 29, 2019
Question

RTC Date Lost after reset

  • April 29, 2019
  • 1 reply
  • 781 views

HI

I use STM32F107RTC6 and configure for time and date

after reset time is ok but date lost and reset to 2000/1/1

please help me

This topic has been closed for replies.

1 reply

waclawek.jan
Super User
April 29, 2019

The 'F1 RTC does not have separate time and date registers, it only has one 32-bit seconds counter. It's up to you how do you use it.

The "libraries" tended to use it only to keep time and then they kept date in the separately in either "normal" RAM or in some battery-backuped RAM, resulting in complaints like these. But there's no reason for this approach, you can store both date and time (against some suitable epoch) in 32-bit counter.

JW