cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 ADC oversampling ratio define missing

KFisc.2
Associate

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.

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

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.

View solution in original post

3 REPLIES 3
KDJEM.1
ST Employee

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.

VO
Associate III

KDJEM:

 

What is the status of this, please? The latest release of the CUBE does not appear to address this. If the patch is not yet available, I would like to have a workaround.

Thanks

KDJEM.1
ST Employee

Hello @VO ,

 

This issue is fixed in STM32CubeMx6.12.0 as mentioned in STM32CubeMX errata 6.12.x - stm32mcu

KDJEM1_1-1721202702075.png

I tested the code generation with STM32CubeMX with STM32H743AGI6 a version 6.12.0 on Windows and didn't reproduce the issue. Please make sure that you that you use the last version of STM32CubeMX.

KDJEM1_0-1721202406366.png

May this post help you!

Could you please share your ioc file?

Thank you.

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.