-
Notifications
You must be signed in to change notification settings - Fork 37
Enable RTC-based Time Alarm functionality #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable RTC-based Time Alarm functionality #542
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enables RTC alarm functionality to allow interrupt-based time alarms, providing a lower power floor by allowing the OsTimer to be shut down in favor of RTC-based wakeups.
Changes:
- Added
set_alarm()andclear_alarm()methods toRtcDatetimeClockfor configuring alarm interrupts - Implemented RTC interrupt handler to wake tasks when alarms fire
- Added example demonstrating the alarm functionality with a custom Future implementation
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/rtc.rs | Added alarm functionality including set/clear methods, static waker, and interrupt handler |
| examples/rt685s-evk/src/bin/rtc-alarm.rs | New example demonstrating RTC alarm usage with custom Future implementation |
| examples/rt685s-evk/README.md | Updated documentation to use generic [device] placeholder |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…docs, clear interrupts in handler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Enables access to the RTC alarm registers to provide an interrupt-based time alarm on the RTC peripheral. This allows for a lower power floor as the OsTimer can be shut down for longer periods in favor of an RTC wake.
Added the following to the RTC peripheral:
rtc-alarm.rs demo added to RT685 EVK examples showing the custom RtcAlarm struct/Future needed to implement the alarm based on the consumer's peripheral synchronization
Demo results: