2025-04-19 3:33 AM
In our project we are using GPDMA for SAI transfers:
STM32CubeMX 6.13.0
STM32Cube_FW_U5_V1.7.0
STM32U535RE target
X-CUBE-FREERTOS 1.3.0 (FreeRTOS 10.6.2)
Description of the behaviour:
Example of expected code:
void GPDMA1_Channel0_IRQHandler(void)
{
/* USER CODE BEGIN GPDMA1_Channel0_IRQn 0 */
/* USER CODE END GPDMA1_Channel0_IRQn 0 */
HAL_DMA_IRQHandler(&handle_GPDMA1_Channel0);
/* USER CODE BEGIN GPDMA1_Channel0_IRQn 1 */
/* USER CODE END GPDMA1_Channel0_IRQn 1 */
}
Actually generated code (note the missing call):
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 */
}
Workaround:
void GPDMA1_Channel0_IRQHandler(void)
{
/* USER CODE BEGIN GPDMA1_Channel0_IRQn 0 */
HAL_DMA_IRQHandler(&handle_GPDMA1_Channel0);
// comment out generated code, so a future generation
// run does not create duplicate calls
#if 0
/* USER CODE END GPDMA1_Channel0_IRQn 0 */
/* USER CODE BEGIN GPDMA1_Channel0_IRQn 1 */
#endif
/* USER CODE END GPDMA1_Channel0_IRQn 1 */
}
Solved! Go to Solution.
2025-04-21 12:01 AM
Hello @xlrl
Using your .ioc file, I've been able to generate the code expected:
void GPDMA1_Channel0_IRQHandler(void)
{
/* USER CODE BEGIN GPDMA1_Channel0_IRQn 0 */
/* USER CODE END GPDMA1_Channel0_IRQn 0 */
HAL_DMA_IRQHandler(&handle_GPDMA1_Channel0);
/* USER CODE BEGIN GPDMA1_Channel0_IRQn 1 */
/* USER CODE END GPDMA1_Channel0_IRQn 1 */
}
I've just made a change on the .ioc file setting the "Call HAL handler" option for this interrupt:
Best Regards.
STTwo-32
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-04-19 7:00 AM - edited 2025-04-20 12:32 AM
Hello @xlrl
Do you have the same issue will using the STM32CubeMX V6.14.1?
Best Regards.
STTwo-32
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-04-19 11:56 PM
Yes, only a few comments changed.
2025-04-20 12:34 AM - edited 2025-04-20 11:41 PM
Hello @xlrl
Thank you so much for escalating this. I will have a look at this. Please add your .ioc file (based on the V6.14.1 of the STM32CubeMX).
Best Regards.
STTwo-32
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-04-20 3:32 AM
2025-04-21 12:01 AM
Hello @xlrl
Using your .ioc file, I've been able to generate the code expected:
void GPDMA1_Channel0_IRQHandler(void)
{
/* USER CODE BEGIN GPDMA1_Channel0_IRQn 0 */
/* USER CODE END GPDMA1_Channel0_IRQn 0 */
HAL_DMA_IRQHandler(&handle_GPDMA1_Channel0);
/* USER CODE BEGIN GPDMA1_Channel0_IRQn 1 */
/* USER CODE END GPDMA1_Channel0_IRQn 1 */
}
I've just made a change on the .ioc file setting the "Call HAL handler" option for this interrupt:
Best Regards.
STTwo-32
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-04-21 1:08 AM
Thanks a lot for the answer.
What I still wonder why this happens in the first state?
The behaviour of the missing call is pretty and hard and time-consuming to debug.
Thanks a lot for your effect,
Alex