cancel
Showing results for 
Search instead for 
Did you mean: 

problem with ADC DMA configuration for STM32H743

TBibe
Associate II

I found that STM32Cubemx version 5.3.0 fails to configure ADC DMA operations when building code for the STM32H743.

The initialization code set the ConversionDataManagement to the wrong value:

 hadc1.Init.ConversionDataManagement = ADC_CONVERSIONDATA_DR;

instead of:

 hadc1.Init.ConversionDataManagement = ADC_CONVERSIONDATA_DMA_CIRCULAR;

1 ACCEPTED SOLUTION

Accepted Solutions
Khouloud ZEMMELI
ST Employee

@Community member​ ,  I think , There's a miss in your CubeMX project configuration.

"hadc1.Init.ConversionDataManagement"  equivalent to "Conversion Data Management Mode" in the Configuration of ADC under Parameter Settings. The default configuration of Conversion Data Management Mode is " Regular Conversion data stored in DR Register only", you need to Set the "Conversion Data Management Mode" to "DMA Circular Mode" to obtain "hadc1.Init.ConversionDataManagement = ADC_CONVERSIONDATA_DMA_CIRCULAR;" in the code Generated .

If problem still exist , don't hesitate to inform me.

Best Regards,

Khouloud.

View solution in original post

3 REPLIES 3
Khouloud ZEMMELI
ST Employee

​Hello @Community member​ ,

Can you please share your ioc file ?

Thanks,

Khouloud.

Khouloud ZEMMELI
ST Employee

@Community member​ ,  I think , There's a miss in your CubeMX project configuration.

"hadc1.Init.ConversionDataManagement"  equivalent to "Conversion Data Management Mode" in the Configuration of ADC under Parameter Settings. The default configuration of Conversion Data Management Mode is " Regular Conversion data stored in DR Register only", you need to Set the "Conversion Data Management Mode" to "DMA Circular Mode" to obtain "hadc1.Init.ConversionDataManagement = ADC_CONVERSIONDATA_DMA_CIRCULAR;" in the code Generated .

If problem still exist , don't hesitate to inform me.

Best Regards,

Khouloud.

I see that option now. I find it very confusing that if you select during the DAM Request Settings -> Mode -> Circular

why wouldn't the ADC Parameter Settings Data management Mode be set to match??