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 ?


    Log in to reply
     

  • 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
 

1 out of 2

Suggested Topics


  • Announcements   29 Mar 2014, 17:08

    1

  • Development   14 Dec 2024, 20:23

    3

  • Development   15 Nov 2024, 10:59

    3

  • Development   4 Feb 2025, 12:14

    3

  • Development   15 days ago

    1
  • 11

16
Online

11.5k
Users

11.1k
Topics

112.8k
Posts