Skip to main content
Ali Pourahmad
Visitor II
March 31, 2017
Question

STM32CubeMX 4.20 BugReport (ADC Dual Mode)

  • March 31, 2017
  • 3 replies
  • 946 views
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
This topic has been closed for replies.

3 replies

Zheng Liang
Associate III
July 12, 2017
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.

ST Technical Moderator
July 12, 2017
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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Sirma Siang
ST Employee
October 13, 2017
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