cancel
Showing results for 
Search instead for 
Did you mean: 

Power mode - STOP

bagrowicz
Associate II
Posted on May 20, 2009 at 04:21

Power mode - STOP

5 REPLIES 5
bagrowicz
Associate II
Posted on May 17, 2011 at 13:12

Hi!

I've try to use STOP power mode in my application based on STM32F102R6. In Standby mode i've got 9,7uA (4,5uA takes uP rest application) and everything was perfect. But now i need to use STOP mode instead of Standby. And there is a problem. My device takes current that floating beetwen 1,4mA - 0,8mA. And i can't go lower wiht that measure. I cut of all of my code and i left only:

void main (void)

{

SystemInit();

RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, ENABLE);

PWR_BackupAccessCmd(ENABLE);

PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);

{

...

}

}

If i put ''PWR_EnterSTANDBYMode();'' instead of ''PWR_EnterSTOPMode'' it works perfect. I know that i can't wakeup from that mode but i doesn't matter right now. First i must deal with big current in Stop mode.

Any sugestions?

Best Regards

P.S. Of course i read Application note number AN2629 about low power modes :)

16-32micros
Associate III
Posted on May 17, 2011 at 13:12

Hi bagrowicz,

Do you have configured all your unused GPIOs to AIN (Analog input) mode

before entering STOP mode, I believe the extra power is coming from the external noise on the pins.

Could you please put this code just before your SystemInit() function and may be after if you would like not to wake-up again :

GPIO_InitTypeDef GPIO_InitStructure;

/* GPIOs Periph clock enable */

RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |

RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD |

RCC_APB2Periph_GPIOE | RCC_APB2Periph_AFIO, ENABLE);

/* Configure all GPIO port pins in Analog Input mode (floating input trigger OFF) */

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;

GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;

GPIO_Init(GPIOA, &GPIO_InitStructure);

GPIO_Init(GPIOB, &GPIO_InitStructure);

GPIO_Init(GPIOC, &GPIO_InitStructure);

GPIO_Init(GPIOD, &GPIO_InitStructure);

GPIO_Init(GPIOE, &GPIO_InitStructure);

/* GPIOs Periph clock disable */

RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOD | RCC_APB2Periph_GPIOE, DISABLE);

And measure again the STOP mode consumption.

Hope this helps you.

Cheers,

ST1.

bagrowicz
Associate II
Posted on May 17, 2011 at 13:12

Thank You very much. STOP mode is working perfectly now :-].

Current is around 11,5-12uA.

Best Regards

Maciej

tpeiris
Associate
Posted on September 20, 2012 at 05:25

Hi STOne, I am using STM32F205 with IAR. Could you send me C code to put the device into stop or standby mode and wake up from PA0

Posted on September 20, 2012 at 20:12

This thread predate the last forum meltdown, seriously doubt the original participants from 3.5 years ago are floating about.

Suggest you dig through the assorted firmware library examples.

The following being a good example, but others in the F2 library PWR/RTC branches would also add some perspective.

STM32F4-Discovery_FW_V1.1.0\Project\Peripheral_Examples\PWR_STOP\main.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..