cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX bug on STM32F4 ADC config?

Andres Cao
Associate III
Posted on March 01, 2017 at 15:26

Hi guys!

I'm currently using the Nucleo 64 board with the STM32F446RE chip.

This microcontroller has 3 ADCs, which according to the reference manual (see pic), can be configured to run as ADC1+ADC in simultaneous mode, and ADC3 independently. This would be for my configuration, MULTI = 0b00110.

0690X00000606SGQAY.png

In this way I can use the ADC1+ADC2 to simultaneously sample current, and do other stuff with ADC3.

However, in CubeMX when I select Mode as ''Dual Regular Simultaneous Only'', ADC3 gets locked up in that same configuration (see pic).

0690X00000606SPQAY.png

Unless I misunderstood the Reference Manual, something would seem to be wrong.

Any clues?

5 REPLIES 5
Imen.D
ST Employee
Posted on March 03, 2017 at 16:29

Hi Andres,

Which CubeMx version are you using ?

Imen

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

Hi Imen,

I'm using 'STM32 Cube V1.0 Version 4.19.0'.

Is it possible to provide a sample code for the Nucleo64-446RE? 

Thanks!!!

Posted on March 03, 2017 at 16:38

Imen,

I got topics mixed up, there's no sample code needed for this.

Jeanne Joly
Senior III
Posted on March 30, 2017 at 16:19

Hello

Cao.Diego_Andres

,

Indeed, it seems that CubeMX behaves wrongly on this specific point.

We will keep you informed when we have a solution and when it will be deliviered.

BR. Eric

Jeanne Joly
Senior III
Posted on May 09, 2017 at 10:07

Hello

Cao.Diego_Andres

,

After reading in detail the

http://www.st.com/content/ccc/resource/technical/document/reference_manual/4d/ed/bc/89/b5/70/40/dc/DM00135pdf/files/DM00135pdf/jcr:content/translations/en.DM00135pdf

doc, we observe that ADC1, 2 and 3 are working together and they take only one value (ADC3 don't take its own value if it works independently as you can see below :

0690X00000606xrQAA.png

ADC1, 2 and 3 are set in MULTI[4:0].

As you already shown, here are the values that ADC1, 2 and 3 can take :

0690X00000606xsQAA.png

if you want to run as

ADC1+ADC in simultaneous mode, and ADC3 independently, ADC1, 2 and 3 will take the value 00101 (as it is configured in CubeMX).

And when you select this value for ADC1 (ADC2 and ADC3 are configured with this value as well as they are working together).

So, for us, CubeMX is correctly configured.

I hope it will help you.

BR.Eric