cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMx sometimes generates initialization calls in the wrong order for ADC and DMA

MArdi.1
Associate

When trying to configure ADC with DMA in CubeMx, the code generation for the calls to the initialization functions sometimes end up in the wrong order, in my case, the call for MX_DMA_Init was placed after the call to MX_ADC1_Init which made the adc reading fail. To fix it, I reseted the peripheral configurations for ADC and DMA in CubeMx and configured them again, this led to the correct order being generated.

It seems that the order of the steps you take to configure the peripherals can sometimes lead to a wrong code generation. This was tested on STM32CubeIDE 1.9.0 which is the last version at the moment of this post.

1 ACCEPTED SOLUTION

Accepted Solutions

This is a bug recurring for years now. For latest development see end of this thread (below "More answers", if you don't see such, reload).

JW

View solution in original post

1 REPLY 1

This is a bug recurring for years now. For latest development see end of this thread (below "More answers", if you don't see such, reload).

JW