Skip to main content
andy239955
Visitor II
May 3, 2016
Question

Low Power ADC readback issue on STM32L052x6

  • May 3, 2016
  • 1 reply
  • 529 views
Posted on May 03, 2016 at 23:27

We set ADC1 on the M0 micro-controller to listen to a GPIO pin. Under low power mode, the reading is shifted.

The low power mode for ADC setup is as following:

    .Instance = ADC1,

    .Init.ClockPrescaler = ADC_CLOCKPRESCALER_PCLK_DIV2,

    .Init.OversamplingMode = DISABLE,

    .Init.DataAlign = ADC_DATAALIGN_RIGHT,

    .Init.ScanConvMode = ADC_SCAN_DIRECTION_FORWARD,

    .Init.LowPowerAutoWait = DISABLE,

    .Init.LowPowerAutoPowerOff = DISABLE,

    .Init.LowPowerFrequencyMode = ENABLE,

    .Init.ContinuousConvMode = ENABLE,

    .Init.DiscontinuousConvMode = DISABLE,

These lines are taken from samples from the dev package. Some how, the readings are shifted. Does anyone have any idea?
    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    May 4, 2016
    Posted on May 04, 2016 at 02:25

    Shifted how exactly?

    You think it might be more illustrative it you provided actual values that you are seeing here vs the value you expect to be seeing?

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..