Fixes #7171
This commit is contained in:
@@ -37,10 +37,13 @@ bool isBootloader(const char * filename)
|
|||||||
void bootloaderFlash(const char * filename)
|
void bootloaderFlash(const char * filename)
|
||||||
{
|
{
|
||||||
FIL file;
|
FIL file;
|
||||||
f_open(&file, filename, FA_READ);
|
|
||||||
uint8_t buffer[1024];
|
uint8_t buffer[1024];
|
||||||
UINT count;
|
UINT count;
|
||||||
|
|
||||||
|
pausePulses();
|
||||||
|
|
||||||
|
f_open(&file, filename, FA_READ);
|
||||||
|
|
||||||
static uint8_t unlocked = 0;
|
static uint8_t unlocked = 0;
|
||||||
if (!unlocked) {
|
if (!unlocked) {
|
||||||
unlocked = 1;
|
unlocked = 1;
|
||||||
@@ -69,6 +72,7 @@ void bootloaderFlash(const char * filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
watchdogSuspend(0);
|
watchdogSuspend(0);
|
||||||
|
WDG_RESET();
|
||||||
|
|
||||||
if (unlocked) {
|
if (unlocked) {
|
||||||
lockFlash();
|
lockFlash();
|
||||||
@@ -76,4 +80,6 @@ void bootloaderFlash(const char * filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
f_close(&file);
|
f_close(&file);
|
||||||
|
|
||||||
|
resumePulses();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user