Skip to content

Commit 545a89f

Browse files
committed
Support GD32F30X DMA IRQ in USART config
Add a GD32F30X-specific NVIC branch in UsartDmaConfig to set priority and enable DMA1_Channel3_Channel4_IRQn. Previously non-F4 targets always used DMA1_Channel4_IRQn; this change configures the correct IRQ name for the GD32F30X series so DMA interrupts are set up properly.
1 parent b205aba commit 545a89f

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)