Skip to main content
TBibe
Associate II
September 26, 2019
Solved

problem with ADC DMA configuration for STM32H743

  • September 26, 2019
  • 3 replies
  • 2056 views

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.
Best answer by Khouloud ZEMMELI

@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
September 27, 2019

​Hello @Community member​ ,

Can you please share your ioc file ?

Thanks,

Khouloud.

Khouloud ZEMMELI
Khouloud ZEMMELIBest answer
ST Employee
September 27, 2019

@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
September 27, 2019

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