Reset the Arduino Due board using the watchdog

Hi,

I'm new with Arduino due and your question is very interesting. I had a look of the mcu data sheet at chapter 17 (watchdog) and I tried to make it working. The first step is to avoid that the function init() inside the file variant.cpp (....\hardware\arduino\sam\variants\arduino_due_x) disable the watchdog by commenting the function WDT_disable(WDT) otherwise you'll not able to enable the watchdog later (the register REG_WDT_MR can be written only once) then in the setup() function inside the sketch I inserted the following instruction:
REG_WDT_MR = 0x0fff2fff;

In order to have the WDT activated.
Now you can use the instruction to reset the WDT:
REG_WDT_CR = 0xa5000001

If you want to reset just avoid to execute the last instruction in the main() function and after 16seconds from the last call the WDT shall reset the mcu and the sketch start again.
I hope my suggestion can be a good starting point.
Kind Regards.

P.s.: remember to remove the comments that you inserted in the variant.cpp file when you don't need the WDT inside your sketch.