Longer sleep values for Watchdogtimer interrupt?


  • Hardware Contributor

    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 ?


  • Hardware Contributor

    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.


Log in to reply
 

Suggested Topics

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts