Skip to main content
Miguel Cabrita
Associate
May 30, 2018
Solved

CubeF0: Clock mode not configured in LL ADC driver

  • May 30, 2018
  • 1 reply
  • 756 views
Posted on May 30, 2018 at 13:38

Hi everyone,

I'm sorry to push this old thread but I'm facing problems using the LL drivers and initializing the ADC.

The function LL_ADC_Init(ADC_TypeDef *ADCx, LL_ADC_InitTypeDef *ADC_InitStruct) doesn't set the CKMODE in ADC_CFGR2.

Does anyone else also have this problem?

Best regards

    This topic has been closed for replies.
    Best answer by Amel NASRI
    Posted on May 30, 2018 at 15:47

    Hi

    Cabrita.Miguel

    ‌,

    I confirm thatLL_ADC_Init has to be updated in order to set the correct value in ADC_CFGR2 depending on selected clock source.

    This issue is reported to our development team.

    As workaround, I suggest you may set ADC clock with a call of 'LL_ADC_SetClock'.

    Ex:LL_ADC_SetClock(ADC1, LL_ADC_CLOCK_SYNC_PCLK_DIV2);

    -Amel

    1 reply

    Amel NASRI
    Amel NASRIBest answer
    Technical Moderator
    May 30, 2018
    Posted on May 30, 2018 at 15:47

    Hi

    Cabrita.Miguel

    ‌,

    I confirm thatLL_ADC_Init has to be updated in order to set the correct value in ADC_CFGR2 depending on selected clock source.

    This issue is reported to our development team.

    As workaround, I suggest you may set ADC clock with a call of 'LL_ADC_SetClock'.

    Ex:LL_ADC_SetClock(ADC1, LL_ADC_CLOCK_SYNC_PCLK_DIV2);

    -Amel

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
    Miguel Cabrita
    Associate
    June 7, 2018
    Posted on June 07, 2018 at 18:21

    Hi Amel,

    thank you for confirming this issue. I'm looking forward to the update

    Best regards