cancel
Showing results for 
Search instead for 
Did you mean: 

problem of consumption(Sleep mode) in STM32-P103??

mustapha_menhou
Associate II
Posted on May 20, 2013 at 13:04

Hi,

I need

to put my

card

STM32

-

P103

standby

I

test the

consumption of all

the

card

I see that

it

uses up to

19mA

but

the literature indicates that

standby power

consumption must

be

to

some

uA

.

here is my code

:

#include ''stm32f10x.h''

#include ''stm32f10x_gpio.h''

#include ''stm32f10x_rcc.h''

#define LED_PORT GPIOC

GPIO_InitTypeDef GPIO_InitStructure;

ErrorStatus HSEStartUpStatus;

void RCC_Configuration(void);

void GPIO_Configuration(void);

void main(void)

{

    

    RCC_Configuration();

    GPIO_Configuration();

    PWR_EnterSTANDBYMode();

    while (1)

    {

    }

}

void RCC_Configuration(void)

{

    RCC_DeInit();

    RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |

    RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD |

    RCC_APB2Periph_GPIOE | RCC_APB2Periph_AFIO, ENABLE);

}

void GPIO_Configuration(void)

{

       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);

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

    ADC_Cmd(ADC1, DISABLE);

}

and thank you for your help
10 REPLIES 10
Posted on June 26, 2013 at 13:54

This might be better with a new thread as the board and part are different.

Current consumption relates to how much is turned off, the SLEEP mode really doesn't turn off much of anything, where as STOP does, and STANDBY significantly more.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..