cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L010K8 on/off ADC Vrefint in low power run mode?

vasilevskialeksandar
Associate III

We have product that runs on two AAA batteries based on STM32L010K8 and according documentation this product should consume around 26uA when in low power run mode(32Khz clock source).

Measurement showed that micro consumes around 90uA which is unacceptable due to battery life.

We tried to turn of Vrefint using HAL_PWREx_EnableUltraLowPower(); in test part in code and indeed current consumption is lowered to around 50uA. 

Problem is that we want this scenario:

In low power run mode keep track of the time and each minute:

1)turn ON Vrefint

2)Turn on ADC

3) make measurement of power supply and two other adc channels.

 4) turn OFF Vrefint

5) turn OFF ADC.

Problem is that there is some hidden dependency and function

HAL_PWREx_EnableUltraLowPower() does not turn off Vrefint and current consumption stays at 90uA.

Could you please propose solution how to lower current consumption and find the culprit why it seems Vrefint is not turned off.

Additionally could you please clarify what is needed ADC to work properly in Low power run mode.

In the datasheet for the micro is stated that ADC can not be used in low power run mode but it seems it works fine in reality.

Second things is if HSI16 clock is a must for ADC or not? In CubeMX is direct connection between this clock and the ADC. 

 

12 REPLIES 12

Hi @dhs,

this thread is specific to the STM32L0xx family and is not relevant to the STM32L5xx family.

JW

dhs
Senior

Hi @waclawek.jan

What is the register name in the STM32L010K8

In which section of the manual I can read about bits that control behavior of peripherals when entring stop mode for the Series STM32L0xx?

 

> What is the register name in the STM32L010K8?

ULP is bit 9 in PWR_CR.

 

> In which section of the manual I can read about bits that control behavior of peripherals when entring stop mode for the Series STM32L0xx?

Generally, in all STM32 RM, low power modes are described in the PWR chapter.  There may be some peripheral-specific informations scattered around in other chapters, too.

In particular, the PWR_CR.ULP bit is described in 6.2.4 Internal voltage reference (V REFINT ) subchapter, but also in 6.3.9 Stop mode subchapter.

JW