Watchdog Timer Prescaler not Setting Correct WDP Bits in IOView

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

In debugwire or simulator, the IO Watchdog WDP bits do not set correctly by altering the prescaler drop down. For example changing the oscillator cycles to 512K clears all the WDP bits. Some of the other prescaler values will set some WDP bits, but not generally correctly. The only way to get it to work is to click on the WDP bits directly - setting WDP3 and WDP0 by this method gives the 8s delay AND the drop down prescaler changes correctly to 1024K cycles.

 

In fact I can neither set the prescaler bits via code - but this is probably not the correct forum for that.

 

Have just updated to the latest AS6.2_1502.

Using ATMega328p on Arduino Uno Board.

 

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

I have never tried WDP bits in the debugger.

 

Regarding regular runtime.    The WDP register requires a timed sequence.  There is probably a GCC header file: http://www.nongnu.org/avr-libc/user-manual/group__avr__watchdog.html

 

I would expect the debugger software to satisfy any timing constraints.

But quite honestly,  you normally don't fiddle with WDP in a debugger.

 

David.

Last Edited: Sun. Dec 28, 2014 - 12:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had optimisation set to none - so debugwire breakpoints work correctly. When I set it to optimise then the 

prescaler sets the WDP bits correctly.

 

Apologies for this.

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

david.prentice wrote:

I have never tried WDP bits in the debugger.

 

Regarding regular runtime.    The WDP register requires a timed sequence.  There is probably a GCC header file.

 

I would expect the debugger software to satisfy any timing constraints.

But quite honestly,  you normally don't fiddle with WDP in a debugger.

 

David.

 

I agree, and I will not be fiddling with them any morewink