cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 4.20 BugReport (ADC Dual Mode)

Ali Pourahmad
Associate
Posted on March 31, 2017 at 03:51

I'm using STM32CubeMX 4.20 and STM32CubeF1 v1.4.0 HAL driver. There is a bug when you configure the ADC1 as dual regular simultaneous mode. The code generator adds multi-mode configuration for both ADCs (master and slave) that make the program fall into Err_Call_Back_function() at the initialization phase. CubeMX also does not add 'hadc2.Init.ExternalTrigConv = ADC_SOFTWARE_START' for ADC2_Init_function() that prevent the dual mode to run properly.

#stm32f1xx #stm32cube #dual-adc
3 REPLIES 3
Zheng Liang
Associate III
Posted on July 12, 2017 at 03:52

Yeah, the bug still exists in latest v4.22.0, it wasted my time to find the bug too.

Imen.D
ST Employee
Posted on July 12, 2017 at 09:55

Hello,

This issue is highlighted internally for further investigation.

Sorry for any inconvenience it may bring for you.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Sirma Siang
ST Employee
Posted on October 13, 2017 at 10:59

Hello

Pourahmad.Ali

,

I would like to great thank you for your feedback.

I confirm you that this has been correctd in CubeMX version 4.

I have tested it with our internal 4.23 branch, and using a F103ZFH Soc, configured with 3 ADCs.

ADC1 in Dual regular simultaneous mode only, with two rank of regular conversion mode.

ADC2 and 3 have one channel (IN0) selection in the pinout panel and default values in the configuration tab.

Then the generated code shows multimode.Mode configuration - and not in ADC2/3 Init functions.

It shows hadc2 and 3 Init.ExternalTrigConv = ADC_Software_Start.

A good way to test it, is to use your ioc file.

Is that an option for you to share it ?

Kind regards

Sirma