cancel
Showing results for 
Search instead for 
Did you mean: 

Problem found in STM32Cube STM32L1 HAL ADC Driver

chuck2
Associate
Posted on September 17, 2015 at 00:47

In stm32l1xx_hal_ad.c in version 1.30 of the STM32Cube library, at line 538, there is a comparison of ScanConvMode to ADC_SCAN_ENABLE.....that works as long as the caller set ScanConvMode to ADC_SCAN_ENABLE rather than the legacy ENABLE, which is defined as a different value. Elsewhere in the library (stm32l1xx_hal_adc.h), there is a check for ADC_SCAN_ENABLE or ENABLE, to support backwards compatibility. I suggest adding a similar check here.

Chuck

#adc #stm32l151
4 REPLIES 4
Posted on September 18, 2015 at 15:39

Hi smith.chuck,

''Elsewhere in the library (stm32l1xx_hal_adc.h), there is a check for ADC_SCAN_ENABLE or ENABLE, to support backwards compatibility''

 

 

Please, could you precise where is this check exactly, because I can not find it!

Thank you

-Shahrzad-

e1369008
Associate II
Posted on September 18, 2015 at 15:52

Your Text Editor's search function must be broken 🙂 Just kidding.

stm32l1xx_hal_adc.h, Line 956:

/* Note: Scan mode is compared to ENABLE for legacy purpose, this parameter */
/* is equivalent to ADC_SCAN_ENABLE. */
#define ADC_CR1_SCAN_SET(_SCAN_MODE_) \
(( ((_SCAN_MODE_) == ADC_SCAN_ENABLE) || ((_SCAN_MODE_) == ENABLE) \
)? (ADC_SCAN_ENABLE) : (ADC_SCAN_DISABLE) \
)

Posted on September 18, 2015 at 19:04

Hi,

Guys, now I see what you are suggesting :-).

Thank you

-Shahrzad-  

Posted on September 21, 2015 at 12:54

Hi ,

Your proposal has been forwarded to development team.

Thank you for your contribution.

-Shahrzad-