I'm testing some assembly code with atmega16 in Proteus 8 with AVRASM compiler and it seems that the WDR instruction isn't work correctly.
From the datasheet, WDR must just reset the watchdog counter. So if I set the watchdog timer to reset the MCU at two seconds and execute the WDR instruction, then the watchdog timer should give me another two seconds.
main:
cbi DDRD, 5
sbi PORTD, 5
ldi r17, 0b00001111
out WDTCR, r17
loop:
in r16, PIND
sbrs r16, 5
wdr
rjmp loop
But in the above code, it seems that after executing WDR by providing PIND5 with 0, then the watchdog timer will never work again and as a result I don't get watchdog reset at inetravls of 2 seconds. I also check the WDTCR register and it isn't changing after executing WDR.