cancel
Showing results for 
Search instead for 
Did you mean: 

How to measure power consumption for Nucleo-144 board?

Dick Lin
Senior

I am trying to measure the power consumption for Nucleo-144 board.

Here is my config

  • External power supply 8V
  • JP6 to VIN
  • Connect Fluke multimeter to power supply
  • Connect multimeter to CN8 pin 15
  • Connect ST-Link
  • Call HAL_PWR_EnterSTANDBYMode() or LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN) force system going standby/shutdown mode.

Is the config correct? I am trying to disable most of the buses before standby. The system doesn't seems go to standby mode since after the call, I am still able to run from IDE.

Is there anything I am missing here?

Thx

HAL_ADCEx_DisableVoltageRegulator(&hadc1);

// HAL_CAN_RequestSleep(&hcan1);

HAL_CAN_Stop(&hcan1);

LL_SPI_Disable(hspi1.Instance);

LL_SPI_Disable(hspi2.Instance);

LL_USART_Disable(huart1.Instance);

LL_USART_Disable(huart2.Instance);

LL_USART_Disable(huart4.Instance);

__HAL_RCC_SPI1_CLK_DISABLE();

__HAL_RCC_SPI2_CLK_DISABLE();

__HAL_RCC_CAN1_CLK_DISABLE();

__HAL_RCC_USART1_CLK_DISABLE();

__HAL_RCC_USART2_CLK_DISABLE();

__HAL_RCC_UART4_CLK_DISABLE();

__HAL_RCC_I2C1_CLK_DISABLE();

__HAL_RCC_I2C2_CLK_DISABLE();

__HAL_RCC_RTCAPB_CLK_DISABLE();

// Disable all used wakeup sources: WKUP pin

HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN2);

HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN3);

// Clear all related wakeup flags

/* Clear PWR wake up Flag */

__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);

__GPIOA_CLK_DISABLE();

__GPIOB_CLK_DISABLE();

__GPIOC_CLK_DISABLE();

__GPIOD_CLK_DISABLE();

__GPIOE_CLK_DISABLE();

__PWR_CLK_DISABLE();

SysTick->CTRL=0x00;

// HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN2);

// HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN3);

__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);

HAL_PWR_EnterSTANDBYMode();

9 REPLIES 9
Dick Lin
Senior

It's interesting. Following GPIO clock disable code actually make system not going to standby mode. I am not sure what's happening. Thx

__GPIOA_CLK_DISABLE();

__GPIOB_CLK_DISABLE();

__GPIOC_CLK_DISABLE();

__GPIOD_CLK_DISABLE();

__GPIOE_CLK_DISABLE();

__PWR_CLK_DISABLE();

SysTick->CTRL=0x00;

Have you tried using an ammeter across the pins normally occupied by JP5? The IDD Jumper

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

I got 16 mA for both standby and shutdown mode. The value should be much lower. Is the config not right or something else ? Thx

Dick Lin
Senior

Yeah, IDD works as expected, down to 0.38 mA in standby mode. Now I am moving to our own board, seems SPI disable function doesn't seems functional well. Thx

Dick Lin
Senior

I can only go down to 2 mA for the standby mode for our board. I am not sure if there is anything missing.

I am pretty sure the only thing power with 3.3 VL is the MCU. We removed external flash, EEPROM. No other component is powered.

Any thoughts what might be missing?

Thx

Not really, I can't commit resources to low-power issues. You should talk with the FAE supporting your design, and perhaps contact the local sales office if your account doesn't have one.

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

One thing I am working on is the GPIO pin before going standby mode. Should I program it to RESET or high impedance or is this matter? Thx

Dick Lin
Senior

One thing I noticed is the UART port. Even I already disable UART, CLOCK, the TX/RX pin still consume power. Not sure what's going on. Thx

LL_USART_Disable(huart1.Instance);

LL_USART_Disable(huart2.Instance);

LL_USART_Disable(huart4.Instance);

__HAL_RCC_SPI1_CLK_DISABLE();

__HAL_RCC_SPI2_CLK_DISABLE();

__HAL_RCC_CAN1_CLK_DISABLE();

__HAL_RCC_USART1_CLK_DISABLE();

__HAL_RCC_USART2_CLK_DISABLE();

__HAL_RCC_UART4_CLK_DISABLE();

  // USART1 GPIO Configuration

  // PB6   ------> USART1_TX

  // PA10   ------> USART1_RX

GPIO_InitStruct.Pin = GPIO_PIN_10;

GPIO_InitStruct.Mode = GPIO_MODE_INPUT;

GPIO_InitStruct.Pull = GPIO_NOPULL;

HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

GPIO_InitStruct.Pin = GPIO_PIN_6;

GPIO_InitStruct.Mode = GPIO_MODE_INPUT;

HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

HAL_GPIO_WritePin(GPIOB, GPIO_PIN_6, GPIO_PIN_RESET);

HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_RESET);

Dick Lin
Senior

Finally figured out the 2 mA was eaten by the JTAG/ST-LINK connection, Removed the JTAG connector will bring the power consumption down to 0.01 mA. Thx