Hi, I am using the below function to enter low power mode in STM32L152, but yet the current consumption of MCU is about 4 mA. is there other configurations?
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR,ENABLE); PWR_EnterLowPowerRunMode(ENABLE);
I achieved the low power modes of MCU to about 3uA. The following commands set the MCU to low power sleep mode:
RCC_Configuration(); PWR_VoltageScalingConfig(PWR_VoltageScaling_Range1); /* Wait Until the Voltage Regulator is ready */ while (PWR_GetFlagStatus(PWR_FLAG_VOS) != RESET) ; /* Init I/O ports */ Init_GPIOs(); GPIO_LowPower_Config(); Config_RCC(&SavRCC); ExtInt_configuration(); SysTick->CTRL = 0; SetHSICLKToMSI(RCC_MSIRange_0,DIV2,NoRTC); SystemCoreClockUpdate(); enableInterrupts(); //TIM4_configuration(); PWR_EnterSleepMode(PWR_Regulator_LowPower,PWR_SLEEPEntry_WFI);
My problem yet is that after switching between modes(RUN,LPR,LPS,..)the MCU does not enter to low power mode!