STM32H753ZI adc oversample CUBEmx error
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-22 7:52 AM
Hello all,
I bought two NUCLEO-H753ZI to experiment the ADC.
Used the CUBEMX inside the STM32CubeIDE to configure the ADC to do 4x oversample (ADC1 Oversampling Ratio = "Oversampling ratio 4x").
Then generated the code, but it does not compile:
...
hadc1.Init.LeftBitShift = ADC_LEFTBITSHIFT_NONE;
hadc1.Init.OversamplingMode = ENABLE;
hadc1.Init.Oversampling.Ratio = ADC3_OVERSAMPLING_RATIO_4;
hadc1.Init.Oversampling.RightBitShift = ADC_RIGHTBITSHIFT_NONE;
...
The error is "... main.c:204:35: error: 'ADC3_OVERSAMPLING_RATIO_4' undeclared ..."
Investigating a little, I found that ADC3_OVERSAMPLING_RATIO_4 is declared in stm32h7xx_hal_adc.h,
but only if ADC_VER_V5_V90 is defined (#if defined...) - which is not.
With oversampling disabled in CubeMX, the compilation goes OK.
I am new to stm32 and CubeMX. How can I solve my problem?
Regards,
linuxfan
Solved! Go to Solution.
Labels:
- Labels:
-
Bug-report
-
STM32Cube MCU Packages
1 ACCEPTED SOLUTION
Accepted Solutions
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-22 7:55 AM
Hello,
This is a known issue raised in this thread. It will be fixed in the coming versions of CubeMx.
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.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-22 7:55 AM
Hello,
This is a known issue raised in this thread. It will be fixed in the coming versions of CubeMx.
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.
