From 97c5634354eaf0eaff043b1bf91039398507db60 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Tue, 10 Dec 2019 17:45:47 +0100 Subject: [PATCH] Fixes #7171 --- radio/src/io/bootloader_flash.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/radio/src/io/bootloader_flash.cpp b/radio/src/io/bootloader_flash.cpp index 0df79800f..1dd5188b6 100644 --- a/radio/src/io/bootloader_flash.cpp +++ b/radio/src/io/bootloader_flash.cpp @@ -37,10 +37,13 @@ bool isBootloader(const char * filename) void bootloaderFlash(const char * filename) { FIL file; - f_open(&file, filename, FA_READ); uint8_t buffer[1024]; UINT count; + pausePulses(); + + f_open(&file, filename, FA_READ); + static uint8_t unlocked = 0; if (!unlocked) { unlocked = 1; @@ -69,6 +72,7 @@ void bootloaderFlash(const char * filename) } watchdogSuspend(0); + WDG_RESET(); if (unlocked) { lockFlash(); @@ -76,4 +80,6 @@ void bootloaderFlash(const char * filename) } f_close(&file); + + resumePulses(); } -- 2.11.4.GIT