2024-05-29 02:32 AM
With the newest CubeMx version 6.11.x, when selecting oversampling, a ratio is being set, and this ratio is a define, which are in "ADC_VER_V5_V90" that is not being set when a new project is created.
#if defined(ADC_VER_V5_V90)
#define ADC3_OVERSAMPLING_RATIO_2 (LL_ADC_OVS_RATIO_2)
#define ADC3_OVERSAMPLING_RATIO_4 (LL_ADC_OVS_RATIO_4)
#define ADC3_OVERSAMPLING_RATIO_8 (LL_ADC_OVS_RATIO_8)
#define ADC3_OVERSAMPLING_RATIO_16 (LL_ADC_OVS_RATIO_16)
#define ADC3_OVERSAMPLING_RATIO_32 (LL_ADC_OVS_RATIO_32)
#define ADC3_OVERSAMPLING_RATIO_64 (LL_ADC_OVS_RATIO_64)
#define ADC3_OVERSAMPLING_RATIO_128 (LL_ADC_OVS_RATIO_128)
#define ADC3_OVERSAMPLING_RATIO_256 (LL_ADC_OVS_RATIO_256)
#define ADC3_OVERSAMPLING_RATIO_512 (LL_ADC_OVS_RATIO_512)
#define ADC3_OVERSAMPLING_RATIO_1024 (LL_ADC_OVS_RATIO_1024)
#endif
This gives an error in the adc.c file as:
hadc1.Init.Oversampling.Ratio = ADC3_OVERSAMPLING_RATIO_4;
The "ADC3_OVERSAMPLING_RATIO_4" is missing/undeclared.
Solved! Go to Solution.
2024-05-29 03:50 AM
Hello @KFisc.2 ,
Same issue is reported here .
The internal ticket 180548 (not accessible by community users) has been opened to confirm and fix the issue.
Thank you for your contribution in STCommunity.
Kaouthar
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.
2024-05-29 03:50 AM
Hello @KFisc.2 ,
Same issue is reported here .
The internal ticket 180548 (not accessible by community users) has been opened to confirm and fix the issue.
Thank you for your contribution in STCommunity.
Kaouthar
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.