HAL_ChibiOS: removed unsafe ISR disable for bl update
can't disable interrupts and call a fn that takes a mutex
This commit is contained in:
parent
c63459c237
commit
352546c9f0
@ -257,9 +257,7 @@ bool Util::flash_bootloader()
|
||||
hal.console->printf("Flashing %s @%08x\n", fw_name, (unsigned int)addr);
|
||||
const uint8_t max_attempts = 10;
|
||||
for (uint8_t i=0; i<max_attempts; i++) {
|
||||
void *context = hal.scheduler->disable_interrupts_save();
|
||||
bool ok = hal.flash->write(addr, fw, fw_size);
|
||||
hal.scheduler->restore_interrupts(context);
|
||||
if (!ok) {
|
||||
hal.console->printf("Flash failed! (attempt=%u/%u)\n",
|
||||
i+1,
|
||||
|
Loading…
Reference in New Issue
Block a user