cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 ADC configuration

pierregalliot9
Associate
Posted on June 13, 2016 at 09:52

RM datasheet specify that ADEN must be 1 before configuring CFGR, SQRx ...

HAL_ADC_Init library configures these registers with ADEN= 0

Which procedure is the right one ?

#adc-config
2 REPLIES 2
slimen
Senior
Posted on June 13, 2016 at 16:37

Hi, 

Could you precise which HAL version are you using ?

In the reference manual is mentioned when no regular conversion is ongoing,

 the ADDIS is set to 0 and ADEN is enabled (ADEN=1).

In case ADDIS=1 it disable the ADC.

Regards
pierregalliot9
Associate
Posted on June 14, 2016 at 10:29

Hi,

In STM32Cube_FW_L4_V1.5.0\driver, file stm32l4xx_hal_adc.c,

function HAL_ADC_Init, lines 468 and 522 ADEN=0

function HAL_Config_Channel, lines 2144, 2151, 2158, 2165 ... ADEN=0

What do we have to believe, HAL or reference manual ?

Regards