cancel
Showing results for 
Search instead for 
Did you mean: 

Power consumption during STOP2 mode.

LMehm
Associate II

Hello!

I have some power consumption during STOP2 mode which is around 470 microamps with some strange waveform like this:

LMehm_0-1690810380699.png

Is it possible some peripheral to cause this consumption?!

 

 

2 REPLIES 2
Aime
ST Employee

Hi @LMehm ,

 

The spikes seem periodic maybe due to a software activity or a pin connected to a external peripheral.

Which STM32 are you using? How to do enter in STOP2 mode?

 

Best regards,

Aime

LMehm
Associate II

Hi Aime!

Thank you for your reply!

I am using STM32L476 microcontroller.

Here is the main cycle:

while (1)
  {
    /* USER CODE END WHILE */
 
    /* USER CODE BEGIN 3 */
 
  if(Flags&START_RAD_MEASURE){
  Flags&=~START_RAD_MEASURE;
  ex_Hibernate();
  sensorMeasureOnce();
  }
 
  if(Flags&ALARM_DETECTED)
  {
  Flags&=~ALARM_DETECTED;
  HAL_GPIO_WritePin(ALRM_LED_GPIO_Port, ALRM_LED_Pin, GPIO_PIN_SET);
  alrmCnt=2;
  }
 
  HAL_SuspendTick();
  HAL_SPI_DeInit(&hspi1);
  HAL_UART_DeInit(&huart2);
  HAL_PWREx_EnterSTOP2Mode(PWR_SLEEPENTRY_WFI);
 
  if(alrmCnt!=0)
  {
  alrmCnt--;
  if(alrmCnt==0)
  {
  HAL_GPIO_WritePin(ALRM_LED_GPIO_Port, ALRM_LED_Pin, GPIO_PIN_RESET);
  }
  }
 
  HAL_ResumeTick();
  SystemClock_Config();
  MX_SPI1_Init();
  MX_USART2_UART_Init();
  }