Skip to content
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

Feature: Periodic alarms between 1 sec and 1 minute #40

Open
sslupsky opened this issue Sep 23, 2018 · 2 comments
Open

Feature: Periodic alarms between 1 sec and 1 minute #40

sslupsky opened this issue Sep 23, 2018 · 2 comments

Comments

@sslupsky
Copy link

The smallest period with the current version is 1 minute. It would be useful to be able to set periodic alarms that fire more frequently.

Perhaps something like MATCH_MS (match milliseconds) ? That would provide a 1 second period. I do not require anything fast than that.

It would be useful to be able to set the period to an arbitrary period between 1 and 59 seconds.

@sslupsky
Copy link
Author

I would like to submit a PR for this issue so I would like to get some feedback. I see two ways to accomplish a better than 1 minute periodic interrupt.

  1. Set a new ALARM timeout in the RTC hander.
  2. Use the Periodic Events

The first method is the technique I presently use. It has the disadvantage that it requires a write to the alarm register. This write causes a SYNCBUSY and requires about 6ms to complete. This is a concern when trying to save power.

The second method involves the Periodic Events generated from the RTC Prescaler. I think the SYNCBUSY delay can be avoided.

Are there any other ways to accomplish this? Any other feedback?

@ravelab
Copy link

ravelab commented Aug 14, 2019

If SYNCBUSY delay can be avoided, that would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants