I try to use a watchdog to get interrupts, no reset,
but it is not working at all.
My code to initialize:
MCUSR &= ~(1<<WDRF);
WDTCSR |= (1<<WDCE) | (1<<WDE); //needed by manual p 50
WDTCSR = 68; // = WDIE=1, WDP2=1, WDE=0 (no reset)
There is no effect, but if I use
wdt_enable(WDTO_120MS) (from wdt.h (WinAVR-gcc)
is it working.
However I can't use wdt.h, because I have to set WDIE and to clear WDE in order to get interrupts and this is not possible in wdt.h
What is wrong in my code?
How can I configure the atmega 644 to get interrupts?
Thank in advance