X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/5ec9d04bcaa0f48098441f36dd6d048ff32ecb99..c7344c22ac700dacf55a8dc729111dd7781c5fed:/Bootloaders/DFU/BootloaderDFU.c?ds=inline diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c index 528e8cb0c..f5c8d170e 100644 --- a/Bootloaders/DFU/BootloaderDFU.c +++ b/Bootloaders/DFU/BootloaderDFU.c @@ -193,6 +193,10 @@ static void ResetHardware(void) /* Shut down the USB and other board hardware drivers */ USB_Disable(); LEDs_Disable(); + + /* Disable Bootloader active LED toggle timer */ + TIMSK1 = 0; + TCCR1B = 0; /* Relocate the interrupt vector table back to the application section */ MCUCR = (1 << IVCE); @@ -669,7 +673,7 @@ static void ProcessMemReadCommand(void) { uint32_t CurrFlashAddress = 0; - while (CurrFlashAddress < BOOT_START_ADDR) + while (CurrFlashAddress < (uint32_t)BOOT_START_ADDR) { /* Check if the current byte is not blank */ #if (FLASHEND > 0xFFFF) @@ -741,7 +745,7 @@ static void ProcessWriteCommand(void) uint32_t CurrFlashAddress = 0; /* Clear the application section of flash */ - while (CurrFlashAddress < BOOT_START_ADDR) + while (CurrFlashAddress < (uint32_t)BOOT_START_ADDR) { boot_page_erase(CurrFlashAddress); boot_spm_busy_wait();