mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
HAL_ChibiOS: fixed assert in reboot
with asserts enabled we can't sleep with interrupts off
This commit is contained in:
parent
79ca1e76c0
commit
dbe0f3c575
@ -249,7 +249,8 @@ void Scheduler::reboot(bool hold_in_bootloader)
|
||||
disable_interrupts_save();
|
||||
|
||||
// wait for 1ms to ensure all pending DMAs are complete
|
||||
delay_microseconds(1000);
|
||||
uint32_t start_us = AP_HAL::micros();
|
||||
while (AP_HAL::micros() - start_us < 1000) ; // busy loop
|
||||
|
||||
// reboot
|
||||
NVIC_SystemReset();
|
||||
|
Loading…
Reference in New Issue
Block a user