3

I'm looking for a timer interrupt library for the new Arduinos based on MCU SAMD21.

I want to wake up periodically the MCU form sleep state, do some task and go sleep again. Using one timer interrupt Arduino wakes up. For new Arduino MKR family.

Do you know a library to do this?

  • I'm voting to close this question as off-topic because it is a request to find an external library or resource, which is not one of the intended purposes of the stack exchange network. Try a web search, it seems to yield results. – Chris Stratton Dec 31 '17 at 17:30
  • 3
    @ChrisStratton Library recommendations are on-topic, according to Arduino SE's on-topic help page. – gre_gor Jan 3 '18 at 20:21
0

Do you know a library to do this?

it is generally very difficult to find a library that does precisely what your application wants. in fact, the purpose of a library is so that it is generic enough for you to tailor it for your specific application.

in this particular case, what you wanted to do is quite simple:

1) read through the datasheet;

2) figure out how the timer works;

3) figure out how the power management works;

4) configure timer isr to wake up the mcu periodically; an overflow isr is typically all you need;

5) run the task directly in the isr if is it short or set a flag for its execution in the loop;

6) upon completion, put the mcu to sleep.

all you need is to tackle the little steps above and you will get it done in no time, and learn a ton about your device.

device datasheet is the best friend of any embedded engineer, not the worst enemy.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.