RTC time lost on reset. #11217
Replies: 4 comments 1 reply
-
Hard(ware) reset is completely independent from software. To cope with that, one would have to store the time at regular frequent intervals in flash. which would wear out flash pretty fast. And still there would be time lags. That's why external RTC devices usually have a small battery to store the actual time value in RAM and to keep the RTC running. Some MCU like STM32 or MIMXRT support that as well with their internal RTC. I do not know if the RP2040 can do that. |
Beta Was this translation helpful? Give feedback.
-
The RP2040 does not support retaining its RTC clock date/time across resets, unfortunately. I too wish that its clock would stay set across resets as long as it were powered. |
Beta Was this translation helpful? Give feedback.
-
DS3231 boards with backup coin cell are readily available on eBay. This doc provides code and details on using them. |
Beta Was this translation helpful? Give feedback.
-
Thanks guys I'm a hardware guy and of course I could use an external RTC.
For now I added a battery backup to the Pico but without
a charging circuit its going to die pretty quick if power goes down. I
agree the RTC without retention on bootup is kind of sad.
Regards Denis Lebel
…On Sat, Apr 8, 2023 at 9:37 AM Peter Hinch ***@***.***> wrote:
DS3231 boards with backup coin cell are readily available on eBay. This
doc <https://github.com/peterhinch/micropython-samples/tree/master/DS3231>
provides code and details on using them.
—
Reply to this email directly, view it on GitHub
<#11217 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEFK5EIQV7MFXZD7MAOZSHTXAFSZZANCNFSM6AAAAAAWW2SRA4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is as much a comment as a suggestion to the powers that be about the RTC clock at least with the RP2 board. I found out the hard (no pun intended) way that upon a hard reset the RTC time is lost. I wish it were otherwise but since I believe the stock Pico does not have any EEprom, my question: Is there an easy solution the storing the RTC tuple in flash or otherwise where so it could be retrieved after a reset.
Regards Denis Lebel
Beta Was this translation helpful? Give feedback.
All reactions