Bootloader should clear the watchdog enable bit

The bootloader should clear the watchdog enable bit, if the fuse hasn't forced it on. This allows sketches to force a reset in software by turning on the watchdog timer and then ignoring it. Very handy if you can't stick your hand where the reset button is.

As long as watchdog code is being touched in the bootloader, it should probably also do a WDR instruction while it loops waiting for characters to keep the timer from going off if it was forced on by the fuses.

any news/comments etc on this topic?

i would like to use the watchdog to reset the arduinobt by software (send a command per bt/uart to enable the watchdog/softresetting bevor calling avrdude to program).

(and maybe later to wake it up from sleep modes...)

but i think, that i would brick it, if i use this method with the default arduino bt bootloader. :confused:

All this could lead to some useful commands in the Arduino language too, since we're trying to build an easy-to-use language for beginners.

Proposed:

ResetBoard()
SetWDT(pin, time, (HIGH/LOW/CHANGE)) // lets user setup the WDT to reset the board if it doesn't see activity on a pin within a certain time frame.
ClearWDT()

bump

Hmm... unless that code is running on another machine I'm afraid:
"ResetBoard()
SetWDT(pin, time, (HIGH/LOW/CHANGE)) // lets user setup the WDT to reset the board if it doesn't see activity on a pin within a certain time frame.
ClearWDT()
Back to top "

will become
ResetBoard()
.
.
.
ResetBoard()
.
.
.
ResetBoard()
.
.
.
ResetBoard()
.
.
.