STMicroelectronics / STM32CubeF4

STM32Cube MCU Full Package for the STM32F4 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
827 stars 409 forks source link

LL_ADC_IsActiveFlag_MST_EOCS does not compile #82

Closed adroudrou closed 2 years ago

adroudrou commented 2 years ago

LL_ADC_IsActiveFlag_MST_EOCS does not compile on my compiler because the parameter is unused.

I think there maybe is a problem on this line return (READ_BIT(ADC1->SR, LL_ADC_FLAG_EOCS) == (LL_ADC_FLAG_EOCS));

maybe use ADCxy_COMMON-> insted of ADC1->

ASELSTM commented 2 years ago

ST Internal Reference: 111256

M-Bab commented 2 years ago

I am quite sure this is wrong. Maybe this is the right solution?

diff --git a/soup/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h b/soup/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h
index 93489114..8df560d2 100644
--- a/soup/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h
+++ b/soup/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h
@@ -4395,7 +4395,7 @@ __STATIC_INLINE void LL_ADC_ClearFlag_AWD1(ADC_TypeDef *ADCx)
   */
 __STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_EOCS(ADC_Common_TypeDef *ADCxy_COMMON)
 {
-  return (READ_BIT(ADC1->SR, LL_ADC_FLAG_EOCS) == (LL_ADC_FLAG_EOCS));
+  return (READ_BIT(ADCxy_COMMON->CSR, LL_ADC_FLAG_EOCS_MST) == (LL_ADC_FLAG_EOCS_MST));
 }
ASELSTM commented 2 years ago

Hi @adroudrou,

This issue has been fixed in the frame of version v1.27.0 of the STM32CubeF4 published recently. Please allow me then to close this thread.

With regards,