2013-08-11 10:23 AM
Hi,
I am using the STM32L-DISCOVERY evaluation board, and I made JP1 off as per the below instructions from the evaluation board user manual:JP1 OFF: the STM32L152 is directly powered, IDD measurement circuit is bypassed.
Note: When jumper JP1 is removed the current consumption of the STM32L152 can be measured by connecting an ammeter between jumper pin 1 and pin 2 of JP1. I am using the following code and measure the current consumed using an Ammeter. I wrote on the right side comment with the actual current consumed: int main(void) { /* Configure PB6 and PB7 as output */ GPIO_Config(); /* Configure PA0 in interrupt mode */ EXTI0_Config(); /* Infinite loop */ while (1) { // PWR_EnterSleepMode(PWR_Regulator_LowPower,PWR_SLEEPEntry_WFI); // 2.3mA // PWR_EnterSTANDBYMode(); // 0.7mA PWR_EnterSTOPMode(PWR_Regulator_LowPower,PWR_STOPEntry_WFI); // 0.7mA } return 0; } These value are far from the expected values that are documented in the STM32L documentation which I expect to be few micro amps in stop and standby modes.
2013-08-11 04:07 PM
/* Disable PVD */
PWR_PVDCmd(DISABLE); /* Enable The ultra Low Power Mode */ PWR_UltraLowPowerCmd(ENABLE); Clocks? GPIO's in Analog Input (turns off outputs, turns off input schmitt trigger)? Driving stuff outside the core is the primary cause of current draw. The examples for switching into low power modes seem more complicated than what you have presented.