From 615d34f1b7b363dc9c1cc79be6834e1e88c30ee8 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Mon, 21 May 2012 16:37:34 +0000 Subject: 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). --- Bootloaders/DFU/BootloaderDFU.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Bootloaders/DFU/BootloaderDFU.c') diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c index 233e145ae..528e8cb0c 100644 --- a/Bootloaders/DFU/BootloaderDFU.c +++ b/Bootloaders/DFU/BootloaderDFU.c @@ -106,11 +106,18 @@ uint32_t MagicBootKey ATTR_NO_INIT; */ 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 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<