Resetting the Arduino with code and no button?

Hello, is it possible to reset the Arduino (like pressing the reset button) but using code?
If so, how?

Thanks.

What did your forum search on the subject tell you?

Basically if you want to do this you are designing your system incorrectly.

Grumpy_Mike:
Basically if you want to do this you are designing your system incorrectly.

OK, thanks.

Grumpy_Mike:
Basically if you want to do this you are designing your system incorrectly.

Nonsense. I have a perfectly legitimate reason to do this in my project, and even managed to get it to work by modifying the bootloader.

My reason is wanting to upload firmware updates with no physical connection to the machine (via bluetooth in this instance).

My reason is wanting to upload firmware updates with no physical connection to the machine

Then you are going about it all wrong if you think you have to reset the processor. Because you can't do a reset from the boot loader, it involves resting some of the hardware that the bootloader will not be able to touch.

Grumpy_Mike:
Because you can't do a reset from the boot loader, it involves resting some of the hardware that the bootloader will not be able to touch.

I'm not doing a reset from the bootloader, I'm doing a reset (via watchdog timer) to get to the bootloader, but I needed a new bootloader because the bootloader is so clever it knows a watchdog reset should just jump to the sketch rather than waiting for an upload.

I'm doing a reset (via watchdog timer)

That is not a reset.
Why not just call the boot loader, a machine code jump should do it.