cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo 32 STM32L4 power consumption, measured with PPK

DPiór.1
Associate III

I have a Nucleo 32 board with STM32L432KC. I am using Power Profiler Kit II to measure the power consumption. I connected PPK Vout to Nucleo's 5V (pin 4 on CN4), GND to GND and the PPK is set as a source meter.

Program on MCU is running for 2s in RUN mode (80 MHz, LED on) and then for 2s in STOP 2 mode (LED off).

Code to enter the STOP 2 mode:

HAL_SuspendTick();
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET);
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);

RTC and GPIO are used to wake up:

if(HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0x02000, RTC_WAKEUPCLOCK_RTCCLK_DIV16) != HAL_OK)
{
  printf("Error setting RTC wakeup timer\n");
  Error_Handler();
}
else
{
  printf("RTC wakeup timer set\n");
}
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
  UNUSED(GPIO_Pin);

  if(GPIO_Pin == GPIO_PIN_12)
  {
	  SystemClock_Config();
	  HAL_ResumeTick();
  }
}

void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc)
{
  UNUSED(hrtc);

  SystemClock_Config();
  HAL_ResumeTick();
}

On top of that the RTC Calendar is used to get the hour:

HAL_RTC_GetTime(&hrtc, &time, RTC_FORMAT_BIN);
HAL_RTC_GetDate(&hrtc, &date, RTC_FORMAT_BIN);
wakeup_current_time = time.Minutes * 60 + time.Seconds;

 

PPK shows that the power consumption for RUN mode is 12,8 mA, which I think is ok. However the power consumption for STOP 2 mode is 2,6 mA which is very high. According to the spec it should be 1,4 uA. Why is it like that? What am I missing?

3 REPLIES 3

@DPiór.1 wrote:

I am using Power Profiler Kit II 


You mean the Nordic Semi Power Profiler: https://www.nordicsemi.com/Products/Development-hardware/Power-Profiler-Kit-2 ?

As this is ST's forum, best not to assume that people will automatically know what that is!

 


@DPiór.1 wrote:

 I connected PPK Vout to Nucleo's 5V (pin 4 on CN4)


Have you made sure to disconnect all connections to the ST-Link?

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
DPiór.1
Associate III

Hi @Andrew Neil 

Yes, I mean the Nordic Power Profiler Kit II.

About which connections to ST-Link are you talking about? 

All connections - SWD, NRST, etc.

See the schematics, and check for anything else which might be "leaking" current.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.