2018-05-31 02:19 AM
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.
2018-06-01 01:14 AM
this issue fixed by clear LPSDSR bit after wakeup from STOP mode.