Skip to main content
TBibe
Associate II
Sep 26, 2019 5:11 PM UTC
Solved

problem with ADC DMA configuration for STM32H743

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;

This topic has been closed for replies.
Khouloud ZEMMELI
Khouloud ZEMMELIBest answer
ST Employee
Sep 27, 2019 9:09 AM UTC

@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.

3 replies

Khouloud ZEMMELI
ST Employee
Sep 27, 2019 7:12 AM UTC

​Hello @Community member​ ,

Can you please share your ioc file ?

Thanks,

Khouloud.

Khouloud ZEMMELI
Khouloud ZEMMELIBest answer
ST Employee
Sep 27, 2019 9:09 AM UTC

@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.

TBibe
TBibeAuthor
Associate II
Sep 27, 2019 5:07 PM UTC

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??