Getting high current in low power mode

Hello everybody,
I am new to this topic so need help. I am trying to build my end node using STM32L151CBU6 and SX1272. When i disconnect the resistor which supplies power to sx1272 i am able to get 1.8uA of current consumption by putting the STM IC in standby mode. But if the resistor is connected i am unable to get the current consumption below 70uA. I even tried to write the RegOpMode register with 0x00 but still not able to get less current.

On the sx1272 side I did the following things

Disabled the RC oscillator
De-Initialized the IO’s
Put sx1272 in sleep mode by writing the RegOpMode register as 0x00
Disabled SPI

on the stm side i did the following things

De-Initialized the UART
De-Initialized the ADC
De-Initialized the GPIO (Made all the GPIO as input and PULL-UP)
De-Initialized the HSE
De-Initialized the LSE
Put the STM32 in standby mode

I am trying to make the current consumption below 8uA.
Any help would be greatly appreciated

do you still have sensors powered when the processor and RF module are in sleepmode ?

I haven’t connected any sensors till now. I just want to reduce the power consumption right now.

why the resistor ?

i disconnected the power of SX1272 so that i could monitor how much current the STM ic consumed in standalone mode. i was thinking that maybe the STM32 was drawing more current but after removing the resistor the STM32 is working fine and when i put it in standby mode it draws around 1.8uA of current.

so the bad guy is the SX1272 when connected.
Low RX current of 10 mA, 100 nA register retention

according to sx1272’s datasheet it should draw around 1uA of current in sleep mode. Is there any way that i can configure the io’s of sx1272. I might be wrong but i guess they remain in floating state that’s why it is drawing this much current

so the only thing the MCU does is setting the sx1272 to sleep and then itself ? if that’s the case I connect a multimeter between the power line and start fiddling with the different sleepmodes and instructions to the sx1272 and see what’s happening to the current draw.

or is there something still running ?

I am not sending any data packet. I tried connecting the CRO to check the output at various pins.

The HSE oscillator and the sx1272 oscillator are not working so is it fair to assume that both the IC’s are in sleep mode?
The RTC oscillator of 32khz is working fine but i guess that consumes around 100nA of current so i dont want to turn that off as i need to come out of sleep mode to transmit the data.

1 Like

The current drawn by sx1272 in standby mode is 1.5mA. As i am getting the current in the range of 70uA so i guess both my IC’s are in sleep mode. Is the order in which i am turning them off wrong?

Any floating input pins? Used a meter to see if any.

probably … I was thinking the same… or maybe you forgot one registerinstruction or something.
I don’t know … have to look it up in the sheet myself :sunglasses:

  • maybe you can extract some info from the semtech driver

I made all the pins as input and pull up to avoid any kind of floating pins on stm32. i am unable to modify the sx1272 pins except for DIO and spi

SX1272Reset();
GpioInit( &AntTx, RADIO_ANT_SWITCH_TX, PIN_INPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 0 );
GpioInit( &AntRx, RADIO_ANT_SWITCH_RX, PIN_INPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 0 );
// SX1272AntSwDeInit();
DelayMs(1);

	SX1272Write(REG_DIOMAPPING1, 0xFF);
	SX1272Write(REG_DIOMAPPING2, 0xFF);

// GpioInit( &SX1272.Spi.Nss, RADIO_NSS, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 1 );

	GpioInit( &SX1272.DIO0, RADIO_DIO_0, PIN_INPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 );
	GpioInit( &SX1272.DIO1, RADIO_DIO_1, PIN_INPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 );
	GpioInit( &SX1272.DIO2, RADIO_DIO_2, PIN_INPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 );
	GpioInit( &SX1272.DIO3, RADIO_DIO_3, PIN_INPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 );
	GpioInit( &SX1272.DIO4, RADIO_DIO_4, PIN_INPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 );
	GpioInit( &SX1272.DIO5, RADIO_DIO_5, PIN_INPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 );
	DelayMs(1);

	SX1272Write(REG_OPMODE, 0x01);
	DelayMs(1);

	SX1272Write(REG_OSC, 0x07);
	DelayMs(1);

	SX1272Write(REG_OPMODE, 0x00);
	DelayMs(1);

// SpiDeInit(&SX1272.Spi);
DelayMs(5);

// UartDeInit(&Uart1);
DelayMs(1);

	HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0, GPIO_PIN_SET);
	DelayMs(7000);
	HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0, GPIO_PIN_RESET);
	DelayMs(2000);


	/*Configure GPIO pins : PC13 PC14 PC15 */
	    	    	  GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15;
	    	    	  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
	    	    	  GPIO_InitStruct.Pull = GPIO_PULLUP;
	    	    	  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
	    	    	  HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);

	    	    	  /*Configure GPIO pins : PH0 PH1 */
	    	    	  GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1;
	    	    	  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
	    	    	  GPIO_InitStruct.Pull = GPIO_PULLUP;
	    	    	  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
	    	    	  HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);

	    	    	  /*Configure GPIO pins : PA0 PA1 PA2 PA3
	    	    	                           PA4 PA5 PA6 PA7
	    	    	                           PA8 PA9 PA10 PA11
	    	    	                           PA12 PA13 PA14 PA15 */
	    	    	  GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
	    	    	                          |GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7
	    	    	                          |GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
	    	    	                          |GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15;
	    	    	  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
	    	    	  GPIO_InitStruct.Pull = GPIO_PULLUP;
	    	    	  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
	    	    	  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

	    	    	  /*Configure GPIO pins : PB0 PB1 PB2 PB10
	    	    	                           PB11 PB12 PB13 PB14
	    	    	                           PB15 PB3 PB4 PB5
	    	    	                           PB6 PB7 PB8 PB9 */
	    	    	  GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_10
	    	    	                          |GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14
	    	    	                          |GPIO_PIN_15|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5
	    	    	                          |GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9;
	    	    	  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
	    	    	  GPIO_InitStruct.Pull = GPIO_PULLUP;
	    	    	  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
	    	    	  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

	    	    	  GpioInit( &SX1272.Spi.Nss, RADIO_NSS, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 0 );
	    	    	  HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0, GPIO_PIN_SET);

/*
__HAL_RCC_GPIOA_CLK_DISABLE();
__HAL_RCC_GPIOB_CLK_DISABLE();
__HAL_RCC_GPIOC_CLK_DISABLE();
__HAL_RCC_GPIOD_CLK_DISABLE();
__HAL_RCC_GPIOH_CLK_DISABLE();
*/

	HAL_PWR_EnterSTANDBYMode();

i checked the current consumption at the rf side. when the led is glowing after disabling the RF part i get around 8uA of current at the sx1272. but after stm32 goes into sleep mode the rf part starts consuming 70uA of current.

The nss pin becomes floating as soon as i put the stm32 ic in stop mode. This was the reason behind the current consumption. When i put it in stop-mode instead with low power regulator on i am able to reduce the current to 9.5uA.

Can this be reduces further?

What about a very high pull-up or pull-down value, like 20k or something? If it’s floating, just about anything should pull it high, and it should not add much to the load when in use.

I cannot add another resistance as the size of the pcb is limited. I had to leave the unused pins as disconnected as well

There’s no way for the MCU to keep a pullup/pulldown in standby mode. All the pins will be set as floating inputs. Are you certain this is the mode you want to use however? You’ll lose everything in SRAM and the MCU will have to be reset to do anything.

EDIT: the datasheet says that standby mode will only use 0.3uA less than stop mode. Are you certain this is worth it?

I want to conserve the power as much as possible. When the MCU wakes up i would reset it, transmit the data and again put the device in low power mode.