cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE v1.9.0 (and 1.8.0) out-of-order initializations

NNar
Associate II

STM32CubeIDE v1.9.0 (and 1.8.0) is generating MX_DMA_Init() AFTER MX_DAC_Init() and this causes the functionality (DMA driving data to the DAC to play a wav file) to fail.

1 ACCEPTED SOLUTION

Accepted Solutions
Sara BEN HADJ YAHYA
ST Employee

Hello @NNar​ ,

This issue is fixed in STM32CubeMX latest release.

V6.6.0 is now available under this Link.

Thanks for your contribution.

Sara.

View solution in original post

3 REPLIES 3
Petr DAVID
ST Employee

Hello NNar,

thank you for letting us know. We are aware of this issue and working on solution. Meanwhile you can solve this issue by disabling the functions calls of  MX_GPIO_Init(); and MX_DMA_Init(); as in the screen capture below 0693W00000NqAaFQAV.pngAnd the write this function calls USER CODE block SysInit:

  /* Configure the system clock */
  SystemClock_Config();
 
/* Configure the peripherals common clocks */
  PeriphCommonClock_Config();
 
  /* USER CODE BEGIN SysInit */
  MX_GPIO_Init();
  MX_DMA_Init();
  /* USER CODE END SysInit */
 
  /* Initialize all configured peripherals */
  MX_ADC1_Init();
  MX_ADC2_Init();
  MX_DAC1_Init();
  MX_TIM3_Init();
  /* USER CODE BEGIN 2 */

With the best regards,

Petr David

Sara BEN HADJ YAHYA
ST Employee

Hello @NNar​ ,

Thanks for your feedback,

As @Petr DAVID​  mentioned, this is a known issue and we are working on it. You can solve this issue by applying what Petr suggested or alternatively by what is described in the following thread MX_DMA_Init order in the main.c file generated by STM32CubeMX, How to fix?

I hope this helps :smiling_face_with_smiling_eyes:

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

Sara BEN HADJ YAHYA
ST Employee

Hello @NNar​ ,

This issue is fixed in STM32CubeMX latest release.

V6.6.0 is now available under this Link.

Thanks for your contribution.

Sara.