Skip to main content
Visitor II
May 18, 2022
Question

How disable VrefInt ?

  • May 18, 2022
  • 1 reply
  • 1180 views

Hi there,

On a battery-powered board using the STM8l050J3, in order to reduce at the minimum the power consumption, in Active Halt mode and using RTC wakeup, (at a few tens or at most hundreds of uA) as indicated, I want to disable Vrefint.

To do so, during initialization, I use this sequence of commands:

---

PWR_DeInit();

PWR_PVDCmd(DISABLE);

PWR_UltraLowPowerCmd(ENABLE);

PWR_FastWakeUpCmd(ENABLE);

VREFINT_STATUS = PWR_GetFlagStatus(PWR_FLAG_VREFINTF);

--- 

... but the VREFINT_STATUS, used only for a verify, return that Vrefint is always SET (value = 1)

Thanks a lot for any suggestion.

Sisto

    This topic has been closed for replies.

    1 reply

    Visitor II
    June 14, 2022

    Hi!

    When you wakeup from active halt mode to read the register about VREFINT status, or before you execute the halt instruction, the VREINT will automatically be enabled. This is why you always read it as 1, on.

    So, the voltage ref. will only be disabled when the CPU is in one of the 2 halt modes, after yuo execute halt instruction.