Skip to main content
KFisc.2
Associate
May 29, 2024
Solved

STM32H7 ADC oversampling ratio define missing

  • May 29, 2024
  • 3 replies
  • 1749 views

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.

Best answer by KDJEM.1

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

3 replies

KDJEM.1
KDJEM.1Best answer
Technical Moderator
May 29, 2024

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.
Associate III
July 16, 2024

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
Technical Moderator
July 17, 2024

Hello @VO_it ,

 

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.