2014-06-07 05:35 AM
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, #bug #adc #st32cubemx #injected #!bug #adc #cubemx2015-01-28 02:15 AM
Hi,
I use the version v4.6.0 and there is still a problem with ADC2 and ADC3. When you start a new config of the ADC, there is no problem to put 0 to 4 injected channels. Problem : when I save the config, and open it again later, the config is still correct but the number of injected channel is reset to 0 ! Then a bad code is generated.. and if I want to set again the number of channels, the old config does not disappear and if you do that several times, it becomes a real mess. (cfr screenshot) 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 ? ________________ Attachments : adc3Bug.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzRh&d=%2Fa%2F0X0000000bM1%2FJSUJCqcejiLxUwggfnPLzXniAJpzjQNenkQppueMAew&asPdf=false2015-02-11 04:14 PM
The problem also occurs in CubeMX for STM32L1. MX seems to want to generate 11 ranks, no matter what. I entered 15 ranks & 4 were dropped, and one rank was reassigned.
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.
That fixed the issue for me, but the channel assignments and sampling time had to be reentered. Cheers, Hal2015-03-13 02:17 AM
Hi,
It's still not OK. Even with your workaround. Note that I use a .ioc file that was created 9 months ago. Please find attach my .ioc file, where it's impossible to generate right config for ADCs injected channels. It's a very annoying problem, since whathever the config you save, when you close then open again the file, the number of injected conversion is reset to 0...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 ?
________________ Attachments : badADC.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzK0&d=%2Fa%2F0X0000000bM0%2FLzl81wGyN6Q6viaVwc3nl7M2sw9Om7x4MBvBr56Hkig&asPdf=false2015-03-17 03:54 AM
Hi Stivy,
Is it possible for you to create a new project from scratch (not based on old .ioc file which should have been created with an old CubeMX version containing some bugs).Now use the CubeMX 4.6.I know, this is not aligned with CubeMX purpose & you may loose some time to re-do configuration, but this way should be cleaner.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2015-03-17 08:44 AM
Perhaps someone at ST should undertake that task, and do a diff on the output, so they fully understand the issue, and can perhaps provide a script or other method to cleanup and fix bad files, or provide an ''import'' function that can recover enough pertinent detail from the original file?
2015-03-26 09:40 AM
Hi,
I've just created a new project with the latest version of cube. The problem is still the same with ADC2 ! When I configure the injected channels the first time it is OK. But when I close then relaunch Cube, the number of injected conversions is reset to 0 ! And when I try to put the right number, the channels are added but the old previous ones stay there and it is a mess. The only workaround is to accept that the number of injected conversion is still 0 and change it manually in the main.c ; but it is lost for further code generation. Please, can someone solve really this problem ?2015-09-22 01:01 AM
Hi there,
It's been 6 month and still no bugfix. Can the ST team handle this ?Thanks a lot,2015-09-22 06:22 AM
Hi Stivy,
Which version of CubeMx are you using?I am using CubeMx 4.10.0, I generated a code for ADC2 and I set a number for injected conversion mode. If I close CubeMx and reload the *.ioc file, the generated number for injected conversion mode still the same and is not reset to 0.-Shahrzad-2016-03-25 03:07 AM
Hi,
Indeed, it has been a long time and lots of bugfixes have been done since my post.It seems to be ok now. We can close this bu and mark this topic as solved :)Thanks.2016-05-04 12:48 AM
Hi. I have similar problem with STM32L152RBT6.
Generated code is/**Configures for the selected ADC injected channel its corresponding rank in the sequencer and its sample time
*/
sConfigInjected.InjectedChannel = ADC_CHANNEL_0;
sConfigInjected.InjectedRank = 1;
sConfigInjected.InjectedSamplingTime = ADC_SAMPLETIME_4CYCLES;
sConfigInjected.InjectedOffset = 0;
sConfigInjected.ExternalTrigInjecConvEdge = ADC_EXTERNALTRIGINJECCONV_EDGE_NONE;
HAL_ADCEx_InjectedConfigChannel(&hadc, &sConfigInjected);
But this strings are missed:
sConfigInjected.ExternalTrigInjecConv = ADC_INJECTED_SOFTWARE_START;
sConfigInjected.InjectedNbrOfConversion = 4;
This is adc configuration window
I'm using
STM32CubeMX 4.0
Firmware Package Name and Version : STM32Cube FW_L1 V1.5.0