Longer sleep values for Watchdogtimer interrupt?
-
According to the data sheet of the atmega328 (and the atmega1284 as well), 4 bits are used in the watchdog register to define the divider value. The smallest value (0) means a sleep duration of 16ms. For the largest value (9) this means 8s.
Values 10 to 15 are reserved (says the datasheet). Does anyone know what happens if you do set the dividerbits to a value of 10? Does it crash the processor? Does it set the sleeptime to 16s?
Has anyone experimented with this ?
-
I had some time yesterday to experiment with the Lowpower library and answered my own question.
Conclusion: you can set the divider to a higher value then 10 (10 is used to test on permanent deep sleep by the Lowpower lib, and Mysensors lib as well I think), but it does not matter, the atmega328 ignores any value above 9, so 8 seconds is the longest deep sleep you can get. Oh well, worth a try.
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
MQTT-Help me understand about the MQTT Gateway.
Development • 2 Mar 2025, 01:44 • dpcons 12 Mar 2025, 23:39 -
PJON and Minicore not working
Development • 21 days ago • Trand 21 days ago -
Radio waking up for no reason.
Development • 4 Jul 2020, 21:09 • Sasquatch 15 Jan 2025, 08:33 -
Adding Listen only device to my system.
Development • 26 Feb 2025, 00:39 • dpcons 26 Feb 2025, 06:26 -
Home Assistant/MySensors quirks
Development • 26 days ago • OldSurferDude 26 days ago