From 5ecf7ff1fe000939e7f9d340fbab167783a958dd Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Sat, 25 Mar 2023 21:16:05 +0000 Subject: [PATCH] AP_HAL_ChibiOS: ensure that DMA source is correct on DMA send for rcout --- libraries/AP_HAL_ChibiOS/RCOutput.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/RCOutput.cpp b/libraries/AP_HAL_ChibiOS/RCOutput.cpp index ab5259a1ea..5d81171f53 100644 --- a/libraries/AP_HAL_ChibiOS/RCOutput.cpp +++ b/libraries/AP_HAL_ChibiOS/RCOutput.cpp @@ -1582,7 +1582,9 @@ void RCOutput::send_pulses_DMAR(pwm_group &group, uint32_t buffer_length) up with this great method. */ TOGGLE_PIN_DEBUG(54); - +#if STM32_DMA_SUPPORTS_DMAMUX + dmaSetRequestSource(group.dma, group.dma_up_channel); +#endif dmaStreamSetPeripheral(group.dma, &(group.pwm_drv->tim->DMAR)); stm32_cacheBufferFlush(group.dma_buffer, buffer_length); dmaStreamSetMemory0(group.dma, group.dma_buffer);