I have a tiny87 on a small board acting as an interface between two devices, all very simple. For the sake of reliability over temperature changes it has an external crystal (8MHz).
The fuses are set to startup using the internal RC oscillator. During initialisation the code switches to the external crystal and then enables the watchdog with a 2 second timeout. The main loop resets the watchdog every time round.
If the clock is not switched to external it works perfectly.
If it switches to the external crystal it runs but gets reset every 2 seconds.
If it switches to an external clock (from STK600) it runs but gets reset every 2 seconds.
If it switches to an external clock or crystal but does not enable the watchdog it runs ok.
The code incorporates workrounds for the errata listed in the datasheet.
The implication is that the wdr instruction no longer clears the watchdog when using an external clock but I can't believe that, it must be something I am doing wrong. I have a ticket in with Atmel but so far their only response has been to totally misunderstand the problem. Has anyone here had any issues with the watchdog or can suggest what I am doing wrong please?
Example code attached.