cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX problem (bug?)

flavio23
Associate III
Posted on March 08, 2017 at 14:33

Hi,

I'm having problems with STM32 CubeMX (v4.19.0) during the setup of the ADC2 peripheral (may be a bug...).

Even if the number of conversion is ONE, I have two different ranks both pointing to the same ADC channel (please refer to the attached screenshot).

I looked into the ioc  and some lines don't convince me (I have only channel 4 active):

'...

ADC2.Channel-20\&sharpChannelRegularConversion=ADC_CHANNEL_4

ADC2.Channel-4\&sharpChannelRegularConversion=ADC_CHANNEL_4

ADC2.Channel-8\&sharpChannelRegularConversion=ADC_CHANNEL_4

...'

Is there any .ioc file cleaner that can fix this behavior?

Thanks in advance

Flavio

#cubemx-bug
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on January 15, 2018 at 15:36

hi

Renga.Flavio

,

I see your point.

In your ioc file, you have :

ADC2.Channel-20\#ChannelRegularConversion=ADC_CHANNEL_4

ADC2.Channel-4\#ChannelRegularConversion=ADC_CHANNEL_4

ADC2.Channel-8\#ChannelRegularConversion=ADC_CHANNEL_4.

whereas it should beADC2.Channel-24\#ChannelRegularConversion=ADC_CHANNEL_4.

You should only have channel 24 configured.

When I take the ioc you provided (on top of CubeMX-4.23), I see 3 ranks for the ADC2. When I untick and tick again the box ADN2 IN4 in the pinout view, the 2 unexpected ranks disappear in the configuration view and it goes well (only one rank seen).

Hope it will help you.

BR. Jeanne

View solution in original post

7 REPLIES 7
Imen.D
ST Employee
Posted on March 08, 2017 at 14:51

Hi,

Could you please precise the device that you are using?

From my side, I have checked for STM32F7xx with the same parameter settings as you and I have one rank : 

0690X00000606W2QAI.png

Maybe, it will be better to share your .ioc file to check this case and identify what is going wrong.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on April 10, 2017 at 08:58

Thank you Imen!

And sorry for the delay in my feedback (problems with my email account...).

In attachment the .ioc file

The problem is in the ADC2 configuration (3 ranks instead of 1)

Thanks

________________

Attachments :

PilotToneController.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hy94&d=%2Fa%2F0X0000000bBT%2FsAJDdV6b1u529KVbsLnxiNReAAmtksEbZK62idhkvKM&asPdf=false
Posted on April 21, 2017 at 01:11

Thank you Imen!

And sorry for the delay in my feedback (problems with my email account...).

In attachment the .ioc file

The problem is in the ADC2 configuration (3 ranks instead of 1)

Thanks

________________

Attachments :

PilotToneController.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyOi&d=%2Fa%2F0X0000000bBN%2FY1IF4rrhOZJwxgi5rv41vizSIh_Gy1X_uua9jVgWPcw&asPdf=false
Imen.D
ST Employee
Posted on April 21, 2017 at 11:32

Hi,

Try using the latest CubeMx version and please keep me updated on your results.

Imen   

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on May 02, 2017 at 10:04

Hi Imen,

unluckily, despite the update to the newest version of the CubeMX plugin,the problem is not solved.

The peripheral works well, but the application still shows 3identical ranks for ADC2.

Any suggestion?

Thanks

Flavio

________________

Attachments :

Window.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hye2&d=%2Fa%2F0X0000000bB0%2FEV63Yshlv3MPkEb3cjMXHZDajfn_z2CTAaJ75hLtC90&asPdf=false
Posted on January 15, 2018 at 15:36

hi

Renga.Flavio

,

I see your point.

In your ioc file, you have :

ADC2.Channel-20\#ChannelRegularConversion=ADC_CHANNEL_4

ADC2.Channel-4\#ChannelRegularConversion=ADC_CHANNEL_4

ADC2.Channel-8\#ChannelRegularConversion=ADC_CHANNEL_4.

whereas it should beADC2.Channel-24\#ChannelRegularConversion=ADC_CHANNEL_4.

You should only have channel 24 configured.

When I take the ioc you provided (on top of CubeMX-4.23), I see 3 ranks for the ADC2. When I untick and tick again the box ADN2 IN4 in the pinout view, the 2 unexpected ranks disappear in the configuration view and it goes well (only one rank seen).

Hope it will help you.

BR. Jeanne

Posted on January 17, 2018 at 10:36

Thank you so much Jeanne!

Best Regards