mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
HAL_ChibiOS: improve reliability of reboot
This commit is contained in:
parent
d1fe9e6c67
commit
79ca1e76c0
@ -244,12 +244,12 @@ void Scheduler::reboot(bool hold_in_bootloader)
|
||||
// lock all shared DMA channels. This has the effect of waiting
|
||||
// till the sensor buses are idle
|
||||
Shared_DMA::lock_all();
|
||||
|
||||
// delay to ensure the async force_saftey operation completes
|
||||
delay(500);
|
||||
|
||||
// disable interrupts during reboot
|
||||
chSysDisable();
|
||||
// disable interrupts
|
||||
disable_interrupts_save();
|
||||
|
||||
// wait for 1ms to ensure all pending DMAs are complete
|
||||
delay_microseconds(1000);
|
||||
|
||||
// reboot
|
||||
NVIC_SystemReset();
|
||||
|
Loading…
Reference in New Issue
Block a user