cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L072_Discovery

Prasanth Velliyangiri
Associate II
Posted on July 17, 2017 at 12:58

Hi Support Team 

I am using STM32L072_Discovery kit..

In cubeMx - Boards i am not able to see my board , i want to check power consumption for this board.

Now i am manually checking using multimeter (i am using I2C , RTC , USART) enable standby mode and i put unused GPIO in Analog mode

consumption is

STANDBY  => 1.14 ua

RUN          =>  635ua , RUN mode consumption  is huge , how can i reduce further...

Below cubeMx generated system clock config

void SystemClock_Config(void)

{

RCC_OscInitTypeDef RCC_OscInitStruct;

RCC_ClkInitTypeDef RCC_ClkInitStruct;

RCC_PeriphCLKInitTypeDef PeriphClkInit;

/**Configure the main internal regulator output voltage

*/

__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);

/**Initializes the CPU, AHB and APB busses clocks

*/

RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI|RCC_OSCILLATORTYPE_MSI;

RCC_OscInitStruct.LSIState = RCC_LSI_ON;

RCC_OscInitStruct.MSIState = RCC_MSI_ON;

RCC_OscInitStruct.MSICalibrationValue = 0;

RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_5;

RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;

if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)

{

_Error_Handler(__FILE__, __LINE__);

}

/**Initializes the CPU, AHB and APB busses clocks

*/

RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK

|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;

RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_MSI;

RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;

RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;

RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;

if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)

{

_Error_Handler(__FILE__, __LINE__);

}

PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART2|RCC_PERIPHCLK_I2C1

|RCC_PERIPHCLK_RTC;

PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1;

PeriphClkInit.I2c1ClockSelection = RCC_I2C1CLKSOURCE_PCLK1;

PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;

if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)

{

_Error_Handler(__FILE__, __LINE__);

}

/**Configure the Systick interrupt time

*/

HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000);

/**Configure the Systick

*/

HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);

/* SysTick_IRQn interrupt configuration */

HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);

}

Q2 : if i am using 240mAh battery , how to calculate battery life cycle , please provide some formula

STANDBY  => 1.14 ua

RUN          =>  635ua (every 15 min device will wake up read i2c data store and go to sleep) 

#murata-cmwx1zzabz-lrwan1-(ver1.1.1) #stm32l-discovery #stm-32lo
3 REPLIES 3
Zt Liu
Senior III
Posted on July 18, 2017 at 03:51

Q2 : if i am using 240mAh battery , how to calculate battery life cycle , please provide some formula

STANDBY  => 1.14 ua

RUN          =>  635ua (every 15 min device will wake up read i2c data store and go to sleep) 

These values are from VDD pins right?

You should measure the total current consumption from you external 5V or Battery pins.

(There are lots of diodes, LDOs, even Leds you should really take care)

Amel NASRI
ST Employee
Posted on July 18, 2017 at 12:36

Hi

V.PRASANTH

‌,

There is no STM32L072_Discovery available, that is why you don't see it in MX. Here the list of L0 boards:

0690X00000607caQAA.png

But you still able to use the PCC (Power Consumption Calculator) features: you have to select the STM32L072 device then configure the peripherals you need to use in your board. The calculator will provide estimations based on your configuration and the values provided in your product datasheet.

-Amel

Edit: it seems you are using theB-L072Z-LRWAN1, right? This one isn't yet supported in MX. I will check if this will be done and when?

My proposal to use PCC based on device selection remains valid

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on July 18, 2017 at 13:05

Thank you for your reply..

Yes i am using 

B-L072Z-LRWAN1 board..

i will use PCC based on device selection - option..

Thank you