cancel
Showing results for 
Search instead for 
Did you mean: 

How disable VrefInt ?

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

1 REPLY 1
Cristian Gyorgy
Senior III

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.