cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube - BUG report : bug in ADC1 injected channels and bad code generation

st239955_stm1
Associate II
Posted on June 07, 2014 at 14:35

Hi,

I'm using STM32CubeMX for a STM32F205 MCU.

There is a problem with the use of the ADC1 configuration, regarding Injected Groups.

 1/ when I choose the number of injected conversions, lots of intrusive 'ranks' display on the frame (normally, you should have the same number of visible ranks than the chosen number of conversions). I join a screenshot. Note that the generation of the code is consistent with the display - but then it generates a wrong code, that doesn't work, and that need to be manually changed. 

 2/ the number of injected conversions is missing at the code generation, and then the configuration of the ADC1 is wrong, the register JSQR is not filled, and it doesn't work. You must add it manually too.  ''sConfigInjected.InjectedNbrOfConversion = 1...4''.

Idem for ADC2.

3/   the JAUTO mode is missing at the code generation, and then the configuration of the ADC1 is wrong (I don't even know why JAUTO is set without doing anything!) and it doesn't work. You must add it manually too.  ''sConfigInjected.AutoInjectedConv = DISABLE;''.  

Idem for ADC2.

4/ in the configuration tab (of ADC1), when pushing on 'Apply' or 'OK' button, CubeMX crashes often. I'm on Windows7 pro 64. 

Can the ST team : 

 - confirm that it is a bug ?

 - let us know when it will be fixed ?

 - let us know when is planned the next update ? 

Thanks,

0690X00000605XFQAY.png

#bug #adc #st32cubemx #injected #!bug #adc #cubemx
26 REPLIES 26
dunkindonut
Associate II
Posted on June 18, 2014 at 14:26

Hi,

i have the same problem with STM32F407VGTx. Is there any bugfix available?

Thanks

stm32cube-t
Senior III
Posted on June 23, 2014 at 09:57

Hello,

The problem has been fixed. Please download the latest STM32CubeMX version 4.3 from

http://www.st.com/stm32cube

.

Let us know if you still encounter this issue.

dunkindonut
Associate II
Posted on June 23, 2014 at 13:15

Hello,

it is working now.

Thank you very much.

st239955_stm1
Associate II
Posted on June 24, 2014 at 12:36

Hi,

Thanks for your update.

But it still does'nt work, even if some bugs have been fixed. 

Regarding my first post, problem 1/ is fixed. 

But problems 2/ and 3/ are still there : the number of injectedChannels is set at 4 by the generated code, even if I select an other number in the config tab ! Moreover, even if I set the 'Injected Conversion Mode' to ''none'' , the JAUTO bit is set by the generated code. 

To finish, why don't you allow a ''0'' number of regular channel conversions ?

In my application, I don't need regular conversion, but the code is even though generated and it is useless and could be a source of problems.

So, please, fix these 3 things because at now, I can not rely on the automatic generated code. When could it be done ?

Regards,

 

dunkindonut
Associate II
Posted on June 25, 2014 at 09:21

Hi,

have you tried to disable the ADC part (Pinout view) and than configue it again? In my application it worked.

Regards

st239955_stm1
Associate II
Posted on July 04, 2014 at 14:25

Hello,

Yes, I did.

But the following parameters should be generated : 

   sConfigInjected.InjectedNbrOfConversion = ... ;

  sConfigInjected.AutoInjectedConv = ... ;

And since it's not, they stay at there default value and then it's still not OK.

Regards,

stm32cube-t
Senior III
Posted on September 24, 2014 at 10:13

Hello,

Fixes for these issues will be delivered in STM32CubeMX 4.4 that should be posted next week.

Best Regards

floriangermain9
Associate II
Posted on October 17, 2014 at 14:33

Hello,

I installed the 4.4 version yesterday, but the problem with the continuousConvMode is not solved according to me.

Has someone a workaround?

I don't understand how the *.ioc file is made. Does someone know?

Thanks.

Gidi
ST Employee
Posted on January 04, 2015 at 14:19

Hi.

For issue #1 its also present in ver 4.5.

I saw a work around that if you lower the ''number of conversion'' to 1 and then increase it back to the number that you want, it will fix the issue. 

Good luck.