Skip to main content
PArch.1
Visitor II
April 30, 2022
Solved

Bug in stm32cubeMX/IDE in STM32F4 Code generation, With DMA

  • April 30, 2022
  • 1 reply
  • 826 views

When generate code via stm32cubeIDE from .ioc ,It Randomly generate line MX_DMA_Init(); Before / After other Module .

Problem is, When other module have some DMA config inside , for me ,it ADC , But MX_DMA_Init(); generate after MX_ADC1_Init(); , That mean __HAL_RCC_DMA2_CLK_ENABLE(); and __HAL_RCC_DMA1_CLK_ENABLE(); inside MX_DMA_Init(); not ativate when ADC config DMA inside HAL_ADC_MspInit , Clock for DMA is not enable when ADC DMA config happen, So that configs are void and don't have effect.

For me it appear randomly

I temperaly fix by add __HAL_RCC_DMA2_CLK_ENABLE();

 __HAL_RCC_DMA1_CLK_ENABLE(); in /* USER CODE BEGIN SysInit */

Did we have some way to fixed the other of mx init sequence?

Sorry for my english

This topic has been closed for replies.

1 reply

TDK
TDKBest answer
Super User
April 30, 2022
"If you feel a post has answered your question, please click ""Accept as Solution""."