© 2004 Microchip Technology Inc. DS70057C-page 10-9
Section 10. WDT and Power Saving Modes
WDT and Power
Saving Modes
10
10.7 Design Tips
Question 1: The device resets even though I have inserted a CLRWDT instruction in my
main software loop.
Answer: Make sure that the software loop that contains the CLRWDT instruction meets the
minimum specification of the WDT (not the typical value). Also, make sure that interrupt
processing time has been accounted for.
Question 2: What should my software do before entering Sleep or Idle mode?
Answer: Make sure that the sources intended to wake the device have their IE bits set. In
addition, make sure that the particular source of interrupt has the ability to wake the device.
Some sources do not function when the device is in Sleep mode.
If the device is to be placed in Idle mode, make sure that the ‘stop-in-idle’ control bit for each
device peripheral is properly set. These control bits determine whether the peripheral will
continue operation in Idle mode. See the individual peripheral sections of this manual for further
details.
Question 3: How do I tell which peripheral woke the device from Sleep or Idle mode?
Answer: You can poll the IF bits for each enabled interrupt source to determine the source of
wake-up.