how to restore date/time in RTC with the backup battery connected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-08 7:47 AM
I do have time working but it will reset each time when I power it off. I do have the backup battery connected.
I thought that it is supposed to keep working on battery and I guess it does.
But I guess I might be missing a few lines to read registers and update the time once power in back on.
- Labels:
-
RTC
-
STM32L4 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-10 1:39 PM
I am trying your code but I do not know where rtc_state is coming from, it says undeclared identfier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-10 3:14 PM
All of these "restoring" ideas and magic values is a complete nonsense. Instead just read the following Jan's articles:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-10 8:27 PM
I use it for traceback RTC initialize step on every each restart.
I just don't want to debug for every time of reboot it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-11 7:24 AM
Thanks for the code, I did not have to change anything just a few new lines. I did not noticed that opening and closing curly bracket are in the user code area and I thought that it would reset the clock each time.
I checked. it works fine the time still counting after power off/on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-11 2:02 PM
Actually all you had to do is just check a single bit as written in the links presented below.

- « Previous
-
- 1
- 2
- Next »