Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate the ADC code for the STM32H750 using CUBEMXV6.11.1, where the Oversampling Ratio must use ADC3_OVERSAMPLING_RATIO_XXX, but an error occurs when compiling. #293

Closed
wdfk-prog opened this issue Jun 16, 2024 · 1 comment
Assignees
Labels
adc ADC-related issue or pull-request bug Something isn't working cube mx Issue related to the Cube MX tool rather than the firmware published within this repository

Comments

@wdfk-prog
Copy link

wdfk-prog commented Jun 16, 2024

Describe the set-up

  • The board (either ST RPN reference or your custom board) : STMH750XX
  • IDE or at least the compiler and its version: STM32CUBEMX V6.11.1
  • STM32Cube_FW_H7_V1.11.2 KEIL V5.40 ARMCLANG V6.22

Describe the bug
image

How To Reproduce

  1. Indicate the global behavior of your application project
  • Generate a code with ADC functionality using STM32CUBEMX V6.11.1
  • To compile, an error will be reported
  1. The modules that you suspect to be the cause of the problem (Driver, BSP, MW ...)
  • You can see that you must have ADC_VER_V5_V90 for the following code to take effect
/**
  * @}
  */
#if defined(ADC_VER_V5_V90)
/** @defgroup ADC_HAL_EC_OVS_RATIO  Oversampling - Ratio
  * @{
  */
#define ADC3_OVERSAMPLING_RATIO_2           (LL_ADC_OVS_RATIO_2)    /*!< ADC oversampling ratio of 2 (2 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */
#define ADC3_OVERSAMPLING_RATIO_4           (LL_ADC_OVS_RATIO_4)    /*!< ADC oversampling ratio of 4 (4 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */
#define ADC3_OVERSAMPLING_RATIO_8           (LL_ADC_OVS_RATIO_8)    /*!< ADC oversampling ratio of 8 (8 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */
#define ADC3_OVERSAMPLING_RATIO_16          (LL_ADC_OVS_RATIO_16)   /*!< ADC oversampling ratio of 16 (16 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */
#define ADC3_OVERSAMPLING_RATIO_32          (LL_ADC_OVS_RATIO_32)   /*!< ADC oversampling ratio of 32 (32 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */
#define ADC3_OVERSAMPLING_RATIO_64          (LL_ADC_OVS_RATIO_64)   /*!< ADC oversampling ratio of 64 (64 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */
#define ADC3_OVERSAMPLING_RATIO_128         (LL_ADC_OVS_RATIO_128)  /*!< ADC oversampling ratio of 128 (128 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */
#define ADC3_OVERSAMPLING_RATIO_256         (LL_ADC_OVS_RATIO_256)  /*!< ADC oversampling ratio of 256 (256 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */
#define ADC3_OVERSAMPLING_RATIO_512         (LL_ADC_OVS_RATIO_512)  /*!< ADC oversampling ratio of 256 (256 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */
#define ADC3_OVERSAMPLING_RATIO_1024        (LL_ADC_OVS_RATIO_1024) /*!< ADC oversampling ratio of 256 (256 ADC conversions are performed, sum of these conversions data is computed to result as the ADC oversampling conversion data (before potential shift). Applicable for ADC3 on devices STM32H72xx and STM32H73xx */
/**
  * @}
  */
#endif
  • You can see that stm32h750xx.h does not have this macro definition

image

  • You can see the original configuration code

image

  • So I think this is a generation problem with cubemx that needs to be corrected;At present, I will manually modify it and use it
@RJMSTM RJMSTM self-assigned this Jun 19, 2024
@RJMSTM RJMSTM added the cube mx Issue related to the Cube MX tool rather than the firmware published within this repository label Jun 19, 2024
@RJMSTM RJMSTM added this to To do in stm32cube-mcu-fw-dashboard via automation Jun 19, 2024
@RJMSTM
Copy link
Contributor

RJMSTM commented Jun 19, 2024

Hello @wdfk-prog,

This point is related to the CubeMX generation problem and not directly related to the firmware published in this repository. Unfortunately we don't treat aspect related to CubeMX tool in our GitHub repositories.
In case you have CubeMX-related issues to share, please submit them in the ST Community in the CubeMX related section. There you shall find people who will address your request and whom you will hopefully find a solution with.

Thank you for your comprehension and thank you again for having reported.

Kind regards,

@RJMSTM RJMSTM moved this from To do to Analyzed in stm32cube-mcu-fw-dashboard Jun 19, 2024
@ALABSTM ALABSTM added adc ADC-related issue or pull-request bug Something isn't working labels Jun 19, 2024
@RJMSTM RJMSTM closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2024
stm32cube-mcu-fw-dashboard automation moved this from Analyzed to Done Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adc ADC-related issue or pull-request bug Something isn't working cube mx Issue related to the Cube MX tool rather than the firmware published within this repository
Projects
Development

No branches or pull requests

3 participants