cancel
Showing results for 
Search instead for 
Did you mean: 

TIMx become slow when enable ULP (STM32L071RB)

dz huang
Associate III
Posted on May 31, 2018 at 11:19

My current project using STM32L071RB chip, and now encounter a strange issue, when I enable PWR_CR ULP bit thr 'HAL_PWREx_EnableUltraLowPower()', the systick (Using TIM2 as timebase) become slow. and if I disable ULP bit, systick will be back to normal.  

following is my power method, before enter STOP mode, I will call this method, and after wake-up from STOP, the HAL_getTick() will become very slow.

static void SystemPower_Config(void)

{

/* Enable Power Control clock */

__HAL_RCC_PWR_CLK_ENABLE();

/* Enable Ultra low power mode */

HAL_PWREx_EnableUltraLowPower();

HAL_PWREx_DisableFastWakeUp();

/* Select HSI as system clock source after Wake Up from Stop mode */

__HAL_RCC_WAKEUPSTOP_CLK_CONFIG (RCC_STOP_WAKEUPCLOCK_HSI);

}

Don't know the root-cause.

1 REPLY 1
dz huang
Associate III
Posted on June 01, 2018 at 10:14

this issue fixed by clear LPSDSR bit after wakeup from STOP mode.