Fixed burst Dshot.

This commit is contained in:
Michael Keller 2021-11-01 02:51:38 +13:00
parent daf202e8c3
commit 60e035be07
2 changed files with 5 additions and 5 deletions

View File

@ -363,10 +363,10 @@ bool pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t m
motor->timer->timerDmaSources &= ~motor->timerDmaSource;
}
if (!dmaIsConfigured) {
xDMA_Cmd(dmaRef, DISABLE);
xDMA_DeInit(dmaRef);
xDMA_Cmd(dmaRef, DISABLE);
xDMA_DeInit(dmaRef);
if (!dmaIsConfigured) {
dmaEnable(dmaIdentifier);
}
@ -438,7 +438,7 @@ bool pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t m
#ifdef USE_DSHOT_DMAR
if (useBurstDshot) {
if (!dmaIsConfigured) {
dmaSetHandler(dmaIdentifier, motor_DMA_IRQHandler, NVIC_PRIO_DSHOT_DMA, timerIndex);
dmaSetHandler(dmaIdentifier, motor_DMA_IRQHandler, NVIC_PRIO_DSHOT_DMA, motor->index);
}
} else
#endif

View File

@ -419,7 +419,7 @@ bool pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t m
#ifdef USE_DSHOT_DMAR
if (useBurstDshot) {
if (!dmaIsConfigured) {
dmaSetHandler(dmaIdentifier, motor_DMA_IRQHandler, NVIC_PRIO_DSHOT_DMA, timerIndex);
dmaSetHandler(dmaIdentifier, motor_DMA_IRQHandler, NVIC_PRIO_DSHOT_DMA, motor->index);
}
} else
#endif