AP_HAL_ChibiOS: catch and handle STM32_DMA_ISR_DMEIF in bdshot.

This commit is contained in:
Andy Piper 2022-04-19 11:38:46 +01:00 committed by Andrew Tridgell
parent 8e0f83aaae
commit 7c4d0ad9f4
1 changed files with 2 additions and 2 deletions

View File

@ -477,7 +477,7 @@ __RAMFUNC__ void RCOutput::dma_up_irq_callback(void *p, uint32_t flags)
}
// check nothing bad happened
if ((flags & STM32_DMA_ISR_TEIF) != 0) {
if ((flags & (STM32_DMA_ISR_TEIF | STM32_DMA_ISR_DMEIF)) != 0) {
INTERNAL_ERROR(AP_InternalError::error_t::dma_fail);
}
dmaStreamDisable(group->dma);
@ -510,7 +510,7 @@ __RAMFUNC__ void RCOutput::bdshot_dma_ic_irq_callback(void *p, uint32_t flags)
chSysLockFromISR();
// check nothing bad happened
if ((flags & STM32_DMA_ISR_TEIF) != 0) {
if ((flags & (STM32_DMA_ISR_TEIF | STM32_DMA_ISR_DMEIF)) != 0) {
INTERNAL_ERROR(AP_InternalError::error_t::dma_fail);
}