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 -
Saving last known good state, but not in EEPROM
Development • 30 Jan 2024, 18:46 • OldSurferDude 15 Jan 2025, 08:51 -
MQTT-Help me understand about the MQTT Gateway.
Development • 2 Mar 2025, 01:44 • dpcons 29 days ago -
Counting Incoming and Outgoing Messages from a Gateway
Development • 10 Dec 2024, 21:57 • Trand 14 Dec 2024, 20:23 -
Radio waking up for no reason.
Development • 4 Jul 2020, 21:09 • Sasquatch 15 Jan 2025, 08:33 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59