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);
If you can't download, then it's probably because you are too early going into low-power mode.
Boot the processor in normal mode and check a GPIO pin or similar to make the decision if you should stay in normal mode or enter low-power mode. This allows you to keep the processor in normal mode while you play with the JTAG interface.
Next thing - make sure you experiment with a development board that doesn't have other electronics around the processor, so you know if you measure the current consumption of the processor or the current consumed by some other electronics.
Thanks for your points. Indeed to measure the current of MCU I have not soldered any other parts on my board. As you said I could not use Discovery board because its consumption is about 60mA with all parts on it. it seems any change in MSI frequency does not affect the power consumption of my board. Any Idea t go step by step to make power consumption low?