cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in STM32CubeMX v 4.22.0 with dual ADC mode

Zheng Liang
Associate III
Posted on July 11, 2017 at 18:48

When I had generated code with dual ADC on regular simultaneous mode from STM32CubeMX, the code after compiled couldn't get to work and rised error handler, so I traced the problem, found that there is a multiple mode configure function in ADC init function, but the configure function only works with ADC1, here is the reason. and I will illustarte it below:

  1. Here is the configure of ADC1 and ADC20690X00000603wIQAQ.jpg

    0690X00000603szQAA.jpg
  2. This is the code in ADC2_Init function:

    0690X00000603t0QAA.jpg
  3. The source code of this function, in the read box, the statement will be false:

    0690X00000603wMQAQ.jpg
  4. Here is the macros:

    0690X00000603wRQAQ.jpg

So, this code in ADC2_Init is meaningless, and bolck the program, I have to delete it everytime after I regenerated the project.

Hopes It's usefull for your guys.

Best Regards,

Zheng.

3 REPLIES 3
Zheng Liang
Associate III
Posted on July 12, 2017 at 03:57

And, the code generated in ADC2_Init function, lacking 'hadc2.Init.ExternalTrigConv = ADC_SOFTWARE_START;' as Ali said in

https://community.st.com/0D50X00009XkY1hSAF

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

Hello

Liang.Zheng

,

Thank you for your reported issue.I will raise this issue internally for checking and come back to you.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on September 07, 2017 at 17:03

Hi

Liang.Zheng

,

Thanks for having reported the issue.

The correction is going to be delivered in next CubeMx v4.1.

Regards.

Cyril