2017-03-30 06:51 PM
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-adc2017-07-11 06:52 PM
Yeah, the bug still exists in latest v4.22.0, it wasted my time to find the bug too.
2017-07-12 12:55 AM
Hello,
This issue is highlighted internally for further investigation.
Sorry for any inconvenience it may bring for you.
Thanks
Imen
2017-10-13 01:59 AM
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