Replies: 4 comments 5 replies
-
I get the feeling you think you can use RTC.CLKSEL to select the clock speed. But it is to select the clock source. |
Beta Was this translation helpful? Give feedback.
-
Oh dear, thanks, you are absolutely right! Leading back to my question: I chose INT1K as source now and set |
Beta Was this translation helpful? Give feedback.
-
Your math is right, so I suspect something else is going on. You may want to post a minimal but working sketch here that demonstrates the 12 second sleep, while you expect a 32 second sleep. Others may load that and try to reproduce what you observe. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your help.
|
Beta Was this translation helpful? Give feedback.
-
Hello,
first of all: thanks a lot for that fantastic project!
These are my first steps on an ATTiny412. I would like to make it sleep for a long time (hours) and then be awake for a long time, too.
Right now I use both 32.768 Hz for Oscillator and for RTC Clock Cycle:
That gives me a nice 1 Hz = 1 second of sleep.
In the ISR the code counts up, and within the loop() we compare how often the device has woken up.
But to increase sleeping time: how low can I go with RTC_CLKSEL (256? 512? 1024?) and how high can I go with RTC_PERIOD_CYC?
And if doing so does it affect accuracy?
Thanks a lot!
Tobias
Beta Was this translation helpful? Give feedback.
All reactions