Incorrect DMA Interrupt Handler Generated for STM32C091xx (LL-Driver)
Environment Details
- Microcontroller: STM32C091CBTx (LQFP48)
- STM32CubeMX Version: 6.14.1
- LL-Driver
- Configuration: An STM32CubeMX project is configured for an STM32C091CBTx MCU, with DMA channel 6 assigned to a peripheral (ADC).
- Generated Code (stm32c0xx_it.c): Upon code generation, CubeMX creates the shared interrupt handler for DMA channels 4, 5, 6, and 7 in the stm32c0xx_it.c file. The function is defined as:
void DMAMUX1_DMA1_CH4_5_6_7_IRQHandler(void)
- Startup File Vector Table (startup_stm32c091xx.s): However, the default startup file provided with the project contains an incorrect entry for this interrupt vector. The handler name in the vector table is listed as:
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:
- In the `startup_stm32c091xx.s` file,
- Search for the incorrect vector name: `DMAMUX_DMA1CH4_5_IRQHandler`.
- Rename it to `DMAMUX1_DMA1_CH4_5_6_7_IRQHandler`.
Following this modification, the DMA interrupt for channel 6 is successfully triggered and handled by the ISR.
