2019-09-26 10:11 AM
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;
Solved! Go to Solution.
2019-09-27 02:09 AM
@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.
2019-09-27 12:12 AM
Hello @Community member ,
Can you please share your ioc file ?
Thanks,
Khouloud.
2019-09-27 02:09 AM
@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.
2019-09-27 10:07 AM
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??