Software Reboot a Nano

No sure where to post this, but does anyone have a softreset process for a Nano that doesn't use a Data-pin and wire to Reset?

After a lot of research I have tried this code and it works on a Uno, but not on the Nano. I burned the Uno bootloader to a Nano and that made the softreset work OK, but I do not want to have a mix of Nanos with Uno bootloader.

void softReset()
{  wdt_enable(WDTO_15MS);
  while(1);
}

It is much better to just create a function that does all your resetting and call it first from setup() and then where you want to reset. Then simply return from loop() and it will be just like executing loop for the first time.

There's a bug in the Nano bootloader that makes it go into an eternal reset loop when you use the watchdog to reset. There's a sort of a software reset you can do:

asm volatile ("jmp 0");

but it isn't a true reset, see http://forum.arduino.cc/index.php?topic=328360.msg2267094#msg2267094 and many other posts on why it's not a very good solution. Much better is just to burn the Uno bootloader on all your Nanos. Fixes the WDT bug and also frees up an extra 1.5kB of flash.

I agree - put uno bootloader on all your Nanos. I do it on all my '328-based boards. Optiboot is just plain better than the nano bootloader.

OK, thanks, I suspected it would come down to that. I will burn the bootloader to them all. I will remove the Nano from the board Library list so I don't forget and try to use with the resulting head-scratching when it doesn't work. :)

Commenting to unlock topic at the request of a forum user.