2017-03-08 05:33 AM
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_4ADC2.Channel-8\&sharpChannelRegularConversion=ADC_CHANNEL_4...'
Is there any .ioc file cleaner that can fix this behavior?
Thanks in advance
Flavio
#cubemx-bugSolved! Go to Solution.
2018-01-15 07:36 AM
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
2017-03-08 05:51 AM
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 :
Maybe, it will be better to share your .ioc file to check this case and identify what is going wrong.
Imen
2017-04-10 01:58 AM
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=false2017-04-20 06:11 PM
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=false2017-04-21 02:32 AM
Hi,
Try using the latest CubeMx version and please keep me updated on your results.
Imen
2017-05-02 03:04 AM
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=false2018-01-15 07:36 AM
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
2018-01-17 02:36 AM
Thank you so much Jeanne!
Best Regards