-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
466: Allow restoring currently running rtc (lost time on initialization) r=burrbull a=Rutherther Hi, I came across a problem when using the Rtc. The problem is that if the microcontroller is reset, some time will be lost due to the reinitialization of the oscillator. In order to solve this, I added methods restore_or_new, restore_or_new_lsi, restore_or_new_hse. These methods check whether the rtc is enabled and the source is correct. If this is the case, the initialization is skipped. After testing this, (for now, only with lse) it worked as intended, no time was lost anymore and the rtc was still counting. What do you think about this? Are there any other things needed to be done, or should I change the behavior somehow? Co-authored-by: František Boháček <[email protected]>
- Loading branch information
Showing
2 changed files
with
135 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters