From: Dean Camera Date: Mon, 21 May 2012 16:37:34 +0000 (+0000) Subject: Turn off watchdog before jumping to the user application in the DFU and CDC based... X-Git-Tag: LUFA-120730~19 X-Git-Url: http://git.linex4red.de/pub/USBasp.git/commitdiff_plain/615d34f1b7b363dc9c1cc79be6834e1e88c30ee8?ds=sidebyside Turn off watchdog before jumping to the user application in the DFU and CDC based bootloaders, for the specific case of /HWB being low during reset (where the bootloader will re-enter). --- diff --git a/Bootloaders/CDC/BootloaderCDC.c b/Bootloaders/CDC/BootloaderCDC.c index 211b054e3..7bff89994 100644 --- a/Bootloaders/CDC/BootloaderCDC.c +++ b/Bootloaders/CDC/BootloaderCDC.c @@ -73,7 +73,13 @@ void Application_Jump_Check(void) /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */ if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) { + /* Turn off the watchdog */ + MCUSR &= ~(1<