mimxrt: Provide the machine.RTC module. #7318
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial version, using the LP rtc clock.
It provides setting the Date & Time with rtc.init() or rtc.datetime()
and reading date & time with rtc.datetime() or rtc.now().
If no battery is supplied, the default boot time/date is 1970/1/1 0:0:0.
With a battery, the clock continues to run even when the board is not
powered. The clock is quite precise. If not, using rtc.calibration()
may help.
Possible extension: set an alarm with alarm handler. For short periods
< 70 minutes this is also possible with the timer module,
for longer periods this may have to be done.