WatchDog on Arduino Nano - does not recover I'm trying to add a watchdog on an Arduino Nano, for my code, and I'm following exactly code in this manual, but after the amount of time for not resetting the watchdog- it resets but does not reboot.

At last paragraph- it says that :"


  However, I could not find something similar in Optiboot bootloader (If
  I'm wrong, correct me please!), used by Arduino UNO and other new
  boards. It seems that they sacrificed this check for size. So, it is
  possible that watchdog timer will be enabled after reset, so -  if you
  set it's value too low, your board may never come out of bootloader
  stage. So, to be always on the safe side, set watchdog to longer
  periods (2S and more).


So I've tried for 8s, but still same result.

What is wrong ?


  EDIT1:


#include &lt;avr/wdt.h&gt;
int k=1;
void setup() {
  Serial.begin(9600);
  wdt_enable(WDTO_8S);
}
void loop() {
  //do stuff here
  k++;
  wdt_reset();
  Serial.println(1000 * k);
  delay(1000 * k);

}
This works on an Uno R3.

The sketch restarts every 4 seconds when wdt_reset() is commented out.

Please copy the code and try it.

  #include &lt;avr/wdt.h&gt;

  void setup() {
    pinMode(13,OUTPUT);
    digitalWrite(13,LOW);

    delay(50);
    digitalWrite(13,HIGH);    // flicker the LED to identify when setup() is running
    delay(50);
    digitalWrite(13,LOW);
    delay(50);
    digitalWrite(13,HIGH);
    delay(50);
    digitalWrite(13,LOW);
    delay(50);
    digitalWrite(13,HIGH);
    delay(50);
    digitalWrite(13,LOW);
    delay(50);

    wdt_enable(WDTO_4S);

  }
  void loop() {
    digitalWrite(13,HIGH);
    delay(500);
    digitalWrite(13,LOW);
    delay(500);
    //wdt_reset();
   }