diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/config/f4/dma_config.h index b535cf4850..016ec32dee 100644 --- a/bsp/stm32/libraries/HAL_Drivers/config/f4/dma_config.h +++ b/bsp/stm32/libraries/HAL_Drivers/config/f4/dma_config.h @@ -259,7 +259,7 @@ extern "C" { #define SPI5_TX_DMA_INSTANCE DMA2_Stream6 #define SPI5_TX_DMA_CHANNEL DMA_CHANNEL_7 #define SPI5_TX_DMA_IRQ DMA2_Stream6_IRQn -#elif defined(BSP_UART6_TX_USING_DMA) && !defined(BSP_USING_SDIO) +#elif defined(BSP_UART6_TX_USING_DMA) && !defined(BSP_USING_SDIO) && !defined(UART6_TX_DMA_INSTANCE) #define UART6_DMA_TX_IRQHandler DMA2_Stream6_IRQHandler #define UART6_TX_DMA_RCC RCC_AHB1ENR_DMA2EN #define UART6_TX_DMA_INSTANCE DMA2_Stream6