Context: I have Arduino DueMilaNove, Freeduino, Seeeduino, Mega, and my customized boards. Arduino IDE 0021. Involved processors: ATmega1280 and ATmega328P.
I am very disappointed with the lack of proper power management support of Arduino. I mean, I do not know if I understood correctly the messages related to this topic, but it seems to me that only external events can interrupt the processor. OK, this is what we expect, but the CLOCK/TIMER... it is always something that we want...
I read a huge number of messages asking for a simple solution, such as, go to sleep (and a start a kind of timer) / the timer timeouts and interrupts the processor / you main application resumes its operation, check stuff, performs actions and go to sleep again...
What I am asking here is the confirmed answers for these questions:
-
If I am using millis() and I RESET the processor, the reference counter is reseted also. If the processor enters into sleep mode for 1minute and wakes up, what occurs with the millis() reference? Is it reseted? Is it resumes from the last counting, therefore causing a real delay of 1min.? Or it continues the correct counting, also considering the 1min-time when the processor was sleeping?
-
Is there "an internal" clock/timer that can be used for sleeping purposes? More specifically, a timer that we can program a certain value for timeout and continues working in sleep mode (eventually waking up the processor)?
-
Assuming that answer (3) is negative, what kind of "feasible" solution (simple to develop and/or cheap to purchase) exists to realize the above scenario?
Thanks for any suggestion or hint!!