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 -
Counting Incoming and Outgoing Messages from a Gateway
Development • 10 Dec 2024, 21:57 • Trand 14 Dec 2024, 20:23 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
Sending offset to node
Development • 31 Jan 2025, 00:59 • bsl88k 4 Feb 2025, 12:14 -
PJON and Minicore not working
Development • 15 days ago • Trand 15 days ago -
MQTT-Help me understand about the MQTT Gateway.
Development • 2 Mar 2025, 01:44 • dpcons 24 days ago