2021-12-07 08:47 AM
The fields ADC1.InjectedConvMode and ADC2.InjectedConvMode of a .ioc file could contain value "None" in the past. This allowed, at least for the F4 family of chips, to disable the JAUTO feature in the CR1 register of the ADC configuration.
In new versions, the "Injected Conversion Mode" setting only has one valid option: "Auto Injected Mode".
The result of this is that code generation no longer allows one to set AutoInjectedConv of the injected config struct to DISABLE.
I believe this is a bug. Any chance this could be looked at?
Thank you.
2021-12-07 09:09 AM
Hi @JHauq.1
I just tried with CubeMX 6.3.0 on target STM32F4, to my point of view it works fine:
For information, as potential workaround, you can still tune your configuration using LL functions.
For example, to disable auto injected mode:
LL_ADC_INJ_SetTrigAuto(ADC1, LL_ADC_INJ_TRIG_INDEPENDENT);
What is your version of CubeMX ?
Do you try from an old project or start a new project ?
Best regards
Philippe
2021-12-07 10:36 AM
Hello Philippe,
You're right, it works correctly for ADC1.
I have to further precise that this problem is for ADC2 and ADC3
I am using version 6.4.0 of CubeMX, but some older versions had the same problem.
I am working with an .ioc file made with a much older version of Cube:
MxCube.Version=5.6.1
MxDb.Version=DB.5.0.60
2021-12-08 05:45 AM
Hello @JHauq.1 ,
I updated to CubeMX 6.4.0, indeed there are some differences in .ioc file.
But for parameter InjectedConvMode, this is the same.
To make it appear in .ioc file, you have to toggle field "Injected Conversion Mode" in GUI:
In all cases, generated code is correct, this is the most important.
Best regards
Philippe