Skip to main content
Gid Rid
Associate III
August 24, 2017
Question

STM32F767 LQFP100 in standby, but core regulator stays on

  • August 24, 2017
  • 3 replies
  • 760 views
Posted on August 24, 2017 at 12:20

I am trying to get the STM32F767 in the LQFP100 package to go into standby but the internal 1.2v regulator stays on.

There is a complication in that it uses external oscillators while running, but for shutdown I switch to HSI, disable the external oscillator and try to enter standby. GPIOE pin 2 asserts then fades away, suggesting that standby is sort of being entered, but the 1.2V regulator stays on, pulling around 5mA. What is keeping it on?

By the way, I didn't have this problem with a previous prototype that used a crystal for the HSE, just call

HAL_PWR_EnterSTANDBYMode() and 

the regulator turns off.

__disable_irq();

// configure WUP4 for wakeup

//HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN4_LOW); // heh, doesn't work

PWR->CR2 |= PWR_CR2_WUPP4;

PWR->CSR2 &= ~PWR_CSR2_EWUP4;

PWR->CR2 |= PWR_CR2_CWUPF4;

PWR->CSR2 |= PWR_CSR2_EWUP4;

HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_1);   // MCO1 to HSI

RCC->CFGR &= ~RCC_CFGR_SW_Msk; // Select HSI for sysclk

while (RCC->CFGR & RCC_CFGR_SWS);   // wait until HSI selected

RCC->CR &= ~RCC_CR_HSEON;   // disable HSE

HAL_GPIO_WritePin(GPIOA, GPIO_PIN_7, GPIO_PIN_RESET); // turn external oscillator off

SysTick->CTRL = 0;

while (!(PWR->CSR2 & PWR_CSR2_WUPF4))   // while wakeup pin is not asserted

{

HAL_GPIO_TogglePin(GPIOE, GPIO_PIN_2); // debug

HAL_PWR_EnterSTANDBYMode();

}
    This topic has been closed for replies.

    3 replies

    After Forever
    Senior III
    August 24, 2017
    Posted on August 24, 2017 at 12:38

    How do you know it's the regulator that pulls the 5mA? In Standby mode the voltage regulator is always disabled and the 1.2V domain is fully powered off.

    Also no need to manually switch to HSI from HSE

    because when entering into Standby mode HSE, HSI and PLL will be disabled all the same.

    Edit: Ah, I have never used external oscillator instead of a standard crystal, now I understand why you turn it off before entering into standby.

    Gid Rid
    Gid RidAuthor
    Associate III
    August 24, 2017
    Posted on August 24, 2017 at 12:46

    I can see that the regulator stays on by the voltage on the VCAP_1 and VCAP_2 pins.

    PA7 enables the external oscillator, which needs to be disabled in standby to reduce power consumption. I cannot turn it off while using it, so I switch to the internal oscillator HSI and then turn it off.

    Gid Rid
    Gid RidAuthor
    Associate III
    December 7, 2017
    Posted on December 07, 2017 at 10:35

    bump