mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
AP_HAL_ChibiOS: reset pwm peripheral on F1 when deallocating IC DMA
This commit is contained in:
committed by
Andrew Tridgell
parent
c2a9bc93b5
commit
ae8a2d9513
@@ -230,6 +230,11 @@ void RCOutput::bdshot_ic_dma_deallocate(Shared_DMA *ctx)
|
||||
chSysLock();
|
||||
if (group.bdshot.ic_dma_handle[icuch] == ctx && group.bdshot.ic_dma[icuch] != nullptr) {
|
||||
dmaStreamFreeI(group.bdshot.ic_dma[icuch]);
|
||||
#if defined(STM32F1)
|
||||
if (group.bdshot.ic_dma_handle[icuch]->is_shared()) {
|
||||
bdshot_disable_pwm_f1(group);
|
||||
}
|
||||
#endif
|
||||
group.bdshot.ic_dma[icuch] = nullptr;
|
||||
}
|
||||
chSysUnlock();
|
||||
|
||||
Reference in New Issue
Block a user