2025-07-17 3:47 AM
Environment Details
void DMAMUX1_DMA1_CH4_5_6_7_IRQHandler(void)
DMAMUX_DMA1CH4_5_IRQHandler
Consequently, the `DMAMUX1_DMA1_CH4_5_6_7_IRQHandler` function is never invoked when an attempt is made to trigger DMA Channel 6.
Confirmed Workaround
The issue can be resolved by manually editing the startup file:
Following this modification, the DMA interrupt for channel 6 is successfully triggered and handled by the ISR.
Solved! Go to Solution.
2025-07-17 6:20 AM
Hello @Kadir
Your contribution is greatly appreciated.
The issue has been escalated to the development team for resolution. The internal ticket number is 214319 .
I will keep you posted with updates.
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-07-17 3:49 AM
Hello @Kadir
I'm currently investigating this issue.
I will get back to you asap
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-07-17 6:20 AM
Hello @Kadir
Your contribution is greatly appreciated.
The issue has been escalated to the development team for resolution. The internal ticket number is 214319 .
I will keep you posted with updates.
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-02-27 1:29 AM - edited 2026-02-27 2:13 AM
Hello the bug is still here, I drop here the repport
Title: STM32CubeMX generates incorrect DMA IRQ handler name for STM32C091xx (DMAMUX1_DMA1_CH4_5_6_7 vs CH4_5)
Component/Tool: STM32CubeMX (code generation)
MCU: STM32C091KBT6 (STM32C0 family)
FW Package: STM32Cube FW_C0 V1.4.0
Existing community report: https://community.st.com/t5/stm32cubemx-mcus/incorrect-dma-interrupt-handler-generated-for-stm32c091xx-ll/td-p/823392
Description:
STM32CubeMX generates an incorrect DMA interrupt handler name in stm32c0xx_it.c and stm32c0xx_it.h for the STM32C091xx target.
Generated code (incorrect):
// In stm32c0xx_it.c / stm32c0xx_it.h
void DMAMUX1_DMA1_CH4_5_6_7_IRQHandler(void)Startup vector table (correct symbol):
// In startup_stm32c091kbtx.s (provided by ST)
.word DMAMUX1_DMA1_CH4_5_IRQHandlerThe handler name DMAMUX1_DMA1_CH4_5_6_7_IRQHandler generated by CubeMX does not match the symbol DMAMUX1_DMA1_CH4_5_IRQHandler defined in the startup file startup_stm32c091kbtx.s. Since the startup file declares this symbol as weak aliased to Default_Handler, the linker silently resolves the interrupt vector to Default_Handler (an infinite loop) instead of the user's ISR.
Root cause analysis:
The STM32C091 has DMA1 channels 1-5 (not 1-7 like larger STM32C0 variants). The startup vector table correctly uses DMAMUX1_DMA1_CH4_5_IRQHandler, but CubeMX code generation uses the name from a larger variant (CH4_5_6_7), creating a mismatch. This appears to be a device variant mapping error in CubeMX's code generation templates.
Impact: Any DMA transfer on channels 4-5 (e.g., USART4 RX DMA in our case) triggers Default_Handler instead of the correct ISR, causing a hard crash (infinite loop). This is a silent failure — the code compiles and links without any warning or error because the weak attribute masks the mismatch.
Regression behavior: This bug is reintroduced on every CubeMX code regeneration, since CubeMX overwrites stm32c0xx_it.c and stm32c0xx_it.h outside of USER CODE sections. This forces developers to manually patch the handler name after every regeneration, which is error-prone and defeats the purpose of the code generator.
Workaround: Manually rename DMAMUX1_DMA1_CH4_5_6_7_IRQHandler to DMAMUX1_DMA1_CH4_5_IRQHandler in both stm32c0xx_it.c and stm32c0xx_it.h after each CubeMX regeneration.
Steps to reproduce:
1. Create a new STM32CubeMX project for STM32C091KBT6
2. Enable DMA on any peripheral using DMA1 channel 4 or 5 (e.g., USART4 RX)
3. Generate code
4. Compare the handler name in stm32c0xx_it.c with the vector table in startup_stm32c091kbtx.s
5. Observe the mismatch: DMAMUX1_DMA1_CH4_5_6_7_IRQHandler vs DMAMUX1_DMA1_CH4_5_IRQHandler
Expected fix: CubeMX should generate DMAMUX1_DMA1_CH4_5_IRQHandler (matching the startup vector table) for STM32C091xx targets.
Edited to apply source code formatting - please see How to insert source code for future reference.
2026-02-27 2:21 AM
Hello @Noëlie_Jestin
Ticket 214319 has not been implemented yet; it will be fixed as soon as possible.
I will keep you posted with updates.
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-02-27 2:27 AM
Thanks! This is good to know (it was very tricky to find the bug ^^")