Closed FRASTM closed 3 years ago
In the LL_ADC_ConfigOverSamplingRatioShift()
function of the stm32h7xx Cube,
the LL_ADC_OVS_RATIO must be converted in a value from 1 to 1024
LL_ADC_OVS_RATIO_2 replaced by ratio = 1
LL_ADC_OVS_RATIO_4 replaced by ratio = 2
LL_ADC_OVS_RATIO_8 replaced by ratio = 3
LL_ADC_OVS_RATIO_16 replaced by ratio = 4
LL_ADC_OVS_RATIO_32 replaced by ratio = 5
LL_ADC_OVS_RATIO_64 replaced by ratio = 6
LL_ADC_OVS_RATIO_128 replaced by ratio = 7
LL_ADC_OVS_RATIO_256 replaced by ratio = 8
Describe the bug The stm32h7 HAL and LL has ADC_LL_EC_OVS_RATIO Oversampling - Ratio defined for only ADC of version ADC_VER_V5_V90. For some stm32H7xx soc, like the stm32h743 and stm32h753, the function LL_ADC_ConfigOverSamplingRatioShift has a different prototype which is not compatible with other soc series. The start-read() fails because the ADC_LL_EC_OVS_RATIO does not exist So the build fails for nucleo_h743zi and nucleo_h753zi target boards.
To Reproduce Steps to reproduce the behavior:
Expected behavior compilation passed
Impact What impact does this issue have on your progress (e.g., annoyance, showstopper)
Logs and console output
Environment (please complete the following information):
Additional context ./modules/hal/stm32/stm32cube/stm32h7xx/stm32h7xx_ll_adc.h: