Skip to main content
ASchm.4
Associate
August 27, 2026
Question

Have CubeMX generate just GPDMAx_Channelx_IRQHandler, but not USARTx_IRQHandler in CubeMX 6.18.1

  • August 27, 2026
  • 1 reply
  • 33 views

Im on STM32H573 and im using a USART with GPDMA for both RX and TX. The project was created with CubeMX 6.16.1. In Pinout & Configuration → Connectivity → USARTx i have the GPDMAx Channel x global interrupts enabled and USARTx global interrupt disabled. Its done this way, so that i can check for the character compare interrupt in my own implementation of USARTx_IRQHandler and then call HAL_UART_IRQHandler myself.

When i load my project in CubeMX 6.18.1, it looks like everything is ok with the checkboxes, but when i generate it, the gpdma irq handlers get generated empty and my project does not work.

/**
* @brief This function handles GPDMA1 Channel 0 global interrupt.
*/
void GPDMA1_Channel0_IRQHandler(void)
{
/* USER CODE BEGIN GPDMA1_Channel0_IRQn 0 */

/* USER CODE END GPDMA1_Channel0_IRQn 0 */
/* USER CODE BEGIN GPDMA1_Channel0_IRQn 1 */

/* USER CODE END GPDMA1_Channel0_IRQn 1 */
}

If i start a fresh CubeMX 6.18.1 project, as soon as i configure the GPDMA for my USART TX request, the checkbox for USARTx global interrupt is silently enabled. Its not gray like the ones for GPDMA, but you can also not deselect it. clicking the box just does nothing.

 

Can we get that option back? Also it would be nice if CubeMX would either force you to migrate outdated projects or generate compatible code, but not silently generate garbage. Also if something is enabled automagically, can i get a popup or something?

 

PS: I know i can put my check for the character compare interrupt in the user code section. It just feels like a step backwards.

1 reply

ST Technical Moderator
August 27, 2026

Hello ​@ASchm.4 

Let me thank you for posting.

For more investigation, I recommend that you provide your Ioc.File.

Thanks.

Mahmoud

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.