cancel
Showing results for 
Search instead for 
Did you mean: 

BL072Z LoRa node high current consumption in low power mode

jg_spitfire
Senior

Hi, I am making some test in low power mode using the end_node example for LoRa but I always get 0.5mA in sleep mode, I use the STM32CubeExpansion_LRWAN_V1.2.1 version and I am doing measurements in the JP3 VDD_MCU_LRA branch

I have read this post where @Remco Groenendaal​ recommend us this:

To get to the lowest power consumption mode using the B072, one should:

1.- be absolutely sure TCXO is not connected to vdd but connected to PA12 (vdd_tcxo)

 

I have changed JP9 to pins 1-2 but is the same

and in the same post @Kevin Genskowsky​ told us this:

Finaly solve it ,

Conected VDD_TCX0 to PA10

and changed ,mlm32l0xx_hw_conf.h

♯ define RADIO_TCXO_VCC_PORT GPIOA

 ,

♯ define RADIO_TCXO_VCC_PIN GPIO_PIN_10

And worked imidiatly PA12 might have some extra configuration that is missing.

So this is very confuse because I don't know if is necessary to change the control pin of TCXO or the solution is just change the position of JP9, or both

2.- set all your defined (and unused) pins to analog before entering lowpower mode, and restore them after resuming from low power

 

3.- deinit all the perhiperals before entering lowpower, and init them again them upon resuming

inside the low power function points 2 and 3 are already done:

//********************inside LPM_EnterStopMode();
 
static void HW_IoDeInit( void )
{
  /*  HW_SPI_IoDeInit( );*/
  GPIO_InitTypeDef initStruct={0};
    
  initStruct.Mode =GPIO_MODE_ANALOG;
  initStruct.Pull =GPIO_NOPULL;
  HW_GPIO_Init ( RADIO_MOSI_PORT, RADIO_MOSI_PIN, &initStruct ); 
  HW_GPIO_Init ( RADIO_MISO_PORT, RADIO_MISO_PIN, &initStruct ); 
  HW_GPIO_Init ( RADIO_SCLK_PORT, RADIO_SCLK_PIN, &initStruct ); 
  HW_GPIO_Init ( RADIO_NSS_PORT, RADIO_NSS_PIN , &initStruct ); 
 
  Radio.IoDeInit( );
  
  vcom_IoDeInit( );
}
 
void vcom_IoDeInit(void)
{
  GPIO_InitTypeDef GPIO_InitStructure={0};
  
  USARTx_TX_GPIO_CLK_ENABLE();
 
  GPIO_InitStructure.Mode = GPIO_MODE_ANALOG;
  GPIO_InitStructure.Pull = GPIO_NOPULL;
  
  GPIO_InitStructure.Pin =  USARTx_TX_PIN ;
  HAL_GPIO_Init(  USARTx_TX_GPIO_PORT, &GPIO_InitStructure );
  
  GPIO_InitStructure.Pin =  USARTx_RX_PIN ;
  HAL_GPIO_Init(  USARTx_RX_GPIO_PORT, &GPIO_InitStructure ); 
}
 
//******************inside LPM_ExitStopMode();
void LPM_ExitStopMode( void)
{
  /* Disable IRQ while the MCU is not running on HSI */
 
  BACKUP_PRIMASK();
  
  DISABLE_IRQ( );
 
  /* After wake-up from STOP reconfigure the system clock */
  /* Enable HSI */
  __HAL_RCC_HSI_ENABLE();
 
  /* Wait till HSI is ready */
  while( __HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET ) {}
  
  /* Enable PLL */
  __HAL_RCC_PLL_ENABLE();
  /* Wait till PLL is ready */
  while( __HAL_RCC_GET_FLAG( RCC_FLAG_PLLRDY ) == RESET ) {}
  
  /* Select PLL as system clock source */
  __HAL_RCC_SYSCLK_CONFIG ( RCC_SYSCLKSOURCE_PLLCLK );
  
  /* Wait till PLL is used as system clock source */ 
  while( __HAL_RCC_GET_SYSCLK_SOURCE( ) != RCC_SYSCLKSOURCE_STATUS_PLLCLK ) {}
    
  /*initilizes the peripherals*/
  HW_IoInit( );
 
  RESTORE_PRIMASK( );
}

4.- float the board e.g.: disconnect any st-link or other debuggers, also the onboard usb segger j-link

are you talking about remove CN8? I don't understand this

5.- run it from batteries and disconnect serial debug when doing the current measurements

a.- debug,trace and sensors are disabled

b.- why is necessary to run from batteries? I mean, the consumption should be the same if you power the board from batteries or USB (or not?) and also, if you remove the solder bridge (SB37) to enable the power from batteries you can not load your code anymore because ST-LINK is disconnected

If anyone has an idea how to resolve this problem please share it, I also read that someone got lower currents using a previous version of the end_node example so it seems this is a common problem

I will continue doing tests and will share you any advance, thanks

1 ACCEPTED SOLUTION

Accepted Solutions
jg_spitfire
Senior

Solved!

lowest currents achieved:

VDD_MCU_LRA = 1.1uA

VDD_RF_LRA = 0.2 - 0.5uA

External power source (CN13) = 1.9uA

Problems:

1.- bad welding on jumper JP3

2.- continuous welding and desoldering of solder bridges (some of these unnecessary)

1.- bad welding on jumper JP3

0690X000009jJf4QAE.jpg

0690X000009jJfJQAU.jpg

while removing the excess of tin and the jumper the current in JP3 decreased from 0.5mA to 0.1mA,but did not get lower, I think that continuous welding and desoldering of solder bridges ad components could damage another componets of the board

2.- continuous welding and desoldering of solder bridges (some of these unnecessary)

to achieve this:

VDD_MCU_LRA = 1.1uA

VDD_RF_LRA = 0.2 - 0.5uA

External power source (CN13) = 1.9uA

option1: (best)

Hardware:

  • R26 = disabled
  • SB18 = disabled
  • SB26* = disabled
  • JP9 = pins 1-2
  • SB37** = disabled

Power source:

  • CN13

cons:

  • if you want to program the board you must weld sb26 again

to achieve this:

VDD_MCU_LRA = 1.1uA

VDD_RF_LRA = 0.2 - 0.5uA

Total current from batteries (multimeter between the three batteries in series and BT1 pin) = 30uA

 option2:

Hardware:

  • R26 = disabled
  • SB18 = disabled
  • D2 = disabled
  • JP9 = pins 1-2
  • SB37** = disabled
  • JP4 = enabled
  • SB26* = enabled

Power source:

  • batteries (multimeter between the three batteries in series and BT1 pin)

*I haven't read in your posts about this solder bridge but the datasheet specifies that if you want to power the board from cn13 you must remove sb26, option 1 is the best way to measure the currents because when you disabled sb26 it isolates all the regulators, modules, etc, and the diode D2 which consumes power from batteries

**it is not necessary to weld again SB37 to reprogram the board, if we look the datasheet of the board the pin #1 of JP10 is the reset of the MCU and pin #5 of CN12 is the reset signal from st-link so you could join them with a cable and re program the board, it fails sometimes but generally works

0690X000009jJpEQAU.jpg

0690X000009jJpnQAE.jpgnote:

tested with versions: 1.1.5, 1.2.1, 1.2.2

example: end_node

it is not necessary to modify the software provided by the example

View solution in original post

9 REPLIES 9
ty.locke
Associate II

There are several posts on this topic already but this is the most useful..

https://community.st.com/s/question/0D50X00009XkbSOSAZ/excess-current-consumption-running-bl072zlrwan1-from-battery

You need to make a couple of hardware modifications to achieve the lowest power, since the dev board design is crap.

Remove R26, remove D2, and close jumper JP4. That should get you down to microamps if all other settings are correct.

Piranha
Chief II

Also do this before going into low-power mode:

DBGMCU->CR = 0; // Disable debug and trace in low-power modes

Hi, but I already have disable debug, sensor and traces in hw_conf.h

//#define DEBUG

Traces: utilities_conf.h

VERBOSE_LEVEL 0

​​

It is the same, right? ​

It's a macro for a C text preprocessing before compiling.

My line disables debug peripheral, which is usually enabled by debug probes and not reset by system reset.

jg_spitfire
Senior

@ty.locke​ Hi, I am doing the current measurement in VDD_MCU_LRA (JP3) branch and I have done all the steps in the forum

  • r26 disabled
  • d2 disabled
  • sb37 disabled
  • JP9 in 1-2 pins
  • JP4 enable
  • powered by batteries
  • I am trying with the version 1.2.0

*** the only recommendation I have not followed is to disable D4, D6 and D7 because is not clear if it is part of the solution

a few minutes ago I disabled the adc and is very strange because that should reduce the consumption even just a little but the multimeter always gives me the same lecture: 0.5mA

and no matter what hardware or software I enable or disable, the lecture is always the same

a few questions:

1.-the wires from my multimeter have 1 meter longitude aprox, do you think that could be the problem?

2.-is correct to take the measure in VDD_MCU_LRA (JP3) branch?

Are you sure you don't have some periodic interrupt left (like SYSTICK) which wakes up the MCU from LP mode?

When I don't enter in stop mode the current is 10mA,and also tried to disable the systick before enter in stop mode and enable it when wake up, but the consumption is the same ​

That's odd that the current would still be 0.5mA with all of the hardware mods and compiler settings in place.

1) You will not get the most accurate measurements from a multimeter due to the meter's burden voltage. It shouldn't be causing that much measurement error, but either way you may want to check the manual for your meter and see what the burden voltage is so you can calculate you're error margin for measuring current in uA-mA range with a 3.3V supply. You may instead want to use a cheap current meter like the currentRanger or uCurrentGold meter to get more accurate measurements. Or you could place a low value current sense resistor across JP3 and use your multimeter to measure the voltage drop across the resistor instead of using it to measure current in series.

2) Yes, measuring across JP3 is correct. I measure about 1uA across JP3 while in stop mode using a current meter.

The only other thing I would say is that I have done all of my work with this board using version 1.1.5 of I-Cube SW. I have not tested current consumption with version 1.2.1 so I wonder if there are others who have had similar issues with that version specifically.

jg_spitfire
Senior

Solved!

lowest currents achieved:

VDD_MCU_LRA = 1.1uA

VDD_RF_LRA = 0.2 - 0.5uA

External power source (CN13) = 1.9uA

Problems:

1.- bad welding on jumper JP3

2.- continuous welding and desoldering of solder bridges (some of these unnecessary)

1.- bad welding on jumper JP3

0690X000009jJf4QAE.jpg

0690X000009jJfJQAU.jpg

while removing the excess of tin and the jumper the current in JP3 decreased from 0.5mA to 0.1mA,but did not get lower, I think that continuous welding and desoldering of solder bridges ad components could damage another componets of the board

2.- continuous welding and desoldering of solder bridges (some of these unnecessary)

to achieve this:

VDD_MCU_LRA = 1.1uA

VDD_RF_LRA = 0.2 - 0.5uA

External power source (CN13) = 1.9uA

option1: (best)

Hardware:

  • R26 = disabled
  • SB18 = disabled
  • SB26* = disabled
  • JP9 = pins 1-2
  • SB37** = disabled

Power source:

  • CN13

cons:

  • if you want to program the board you must weld sb26 again

to achieve this:

VDD_MCU_LRA = 1.1uA

VDD_RF_LRA = 0.2 - 0.5uA

Total current from batteries (multimeter between the three batteries in series and BT1 pin) = 30uA

 option2:

Hardware:

  • R26 = disabled
  • SB18 = disabled
  • D2 = disabled
  • JP9 = pins 1-2
  • SB37** = disabled
  • JP4 = enabled
  • SB26* = enabled

Power source:

  • batteries (multimeter between the three batteries in series and BT1 pin)

*I haven't read in your posts about this solder bridge but the datasheet specifies that if you want to power the board from cn13 you must remove sb26, option 1 is the best way to measure the currents because when you disabled sb26 it isolates all the regulators, modules, etc, and the diode D2 which consumes power from batteries

**it is not necessary to weld again SB37 to reprogram the board, if we look the datasheet of the board the pin #1 of JP10 is the reset of the MCU and pin #5 of CN12 is the reset signal from st-link so you could join them with a cable and re program the board, it fails sometimes but generally works

0690X000009jJpEQAU.jpg

0690X000009jJpnQAE.jpgnote:

tested with versions: 1.1.5, 1.2.1, 1.2.2

example: end_node

it is not necessary to modify the software provided by the example