Does WDR alone enable the watchdog?

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If WDTON is unprogrammed (OFF), WDE is not explicitly enabled anywhere in the code, does executing a WDR instruction alone enable the watchdog?

 

In a local forum, something along this line was hinted to happen in an ATMega168, but I don't have one. Can somebody please try and/or confirm or otherwise?

 

Thanks,

 

Jan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

does executing a WDR instruction alone enable the watchdog?

 No.  You can put 1000 WDR instructions into your Mega and then gpo into an infinite loop. The watchdog timer will never fire.

 

What makes you think that that operation made sense?  Does clearing ADIF or TXC start the ADC and USART?  Why does the datasheet have a whole section on enabling the WDT?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lee wrote:
No.

Thanks.

 

Lee wrote:
What makes you think that that operation made sense?

The symptoms described in our local thread pointed in that way; but you know how it is with debugging someone else's project - he might have done a dozen of other things plus described the problem inaccurately enough...

 

I've seen this behaviour in the past in watchdogs, not in AVRs.

 

Jan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've seen this behaviour in the past in watchdogs, not in AVRs.

Interesting.  Like a toggle-on, toggle-off?  I guess it could make sense when starting with a clean sheet of paper.  When you hit the "Clear" button, the timer starts counting up.  So the Clear button is both Clear and Start.  After existing with AVR8 watchdog timers for over a decade it sounded quite strange at first.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.