Skip to content

Commit ae63e90

Browse files
committed
Enable DMA1 Ch3/4 IRQ for GD32F30X
Add NVIC_SetPriority/NVIC_EnableIRQ for DMA1_Channel3_Channel4_IRQn when building for GD32F30X. Previously the code only handled DMA1_Channel4_IRQn for non-GD32F4XX targets; this change ensures the correct IRQ is enabled for the GD32F30X DMA channel mapping while preserving the existing non-F4XX and F4XX branches.
1 parent f8abede commit ae63e90

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lib-dmx/src/gd32/dmx.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,10 @@ static void UsartDmaConfig() {
24502450
dma_channel_subperipheral_select(UART3_DMAx, UART3_TX_DMA_CHx, UART3_TX_DMA_SUBPERIx);
24512451
#endif
24522452
Gd32DmaInterruptDisable<UART3_DMAx, UART3_TX_DMA_CHx, DMA_INTERRUPT_DISABLE>();
2453-
#if !defined(GD32F4XX)
2453+
#if defined(GD32F30X)
2454+
NVIC_SetPriority(DMA1_Channel3_Channel4_IRQn, 1);
2455+
NVIC_EnableIRQ(DMA1_Channel3_Channel4_IRQn);
2456+
#elif !defined(GD32F4XX)
24542457
NVIC_SetPriority(DMA1_Channel4_IRQn, 1);
24552458
NVIC_EnableIRQ(DMA1_Channel4_IRQn);
24562459
#else

lib-superloop/.clangd

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)