Skip to main content
JBive.1
Associate II
May 28, 2024
Solved

B-WL5M-SUBG1 (STM32WL5MOC) current consumption too high

  • May 28, 2024
  • 2 replies
  • 2174 views

Hello,

We have an issue with the B-WL5M-SUBG1 evaluation board: The idle current consumption is higher than expected: 89 uA (vs. expected: 1-2 uA) after joining (OTAA) successfully.

  • Board: B-WL5M-SUBG1
  • Firmware: STM32CubeWL/Projects/B-WL5M-SUBG1/Applications/LoRaWAN/LoRaWAN_AT_Slave and STM32CubeWL/Projects/B-WL5M-SUBG1/Applications/LoRaWAN/LoRaWAN_End_Node
  • Firmware version: STM32CubeWL V1.3.0 (latest from https://github.com/STMicroelectronics/STM32CubeWL)
  • Power supply: 5 V via USB-C adapter board
  • Current measurement: STM32WL5MOC, not including sensors, measured at IDD jumper (JP2) using Joulescope

Do you have an idea what could be the issue?

Thanks!

Best answer by alexemdesgagne

Hi,
To resolve this issue, we pull the UART TX and RX pins high.

Maybe that could help you.

Alexandre

2 replies

STTwo-32
Technical Moderator
May 28, 2024

Could you please add the details of the configurations that you are doing.

Best Regards.

STTwo-32

JBive.1
JBive.1Author
Associate II
May 28, 2024

Hi, steps to reproduce the issue:

  • Firmware: Clone from https://github.com/STMicroelectronics/STM32CubeWL, import project "LoRaWAN_AT_Slave" into STM32CubeIDE, compile "Debug" using STM32CubeIDE.
  • Connect debugger (STLINK-V3PWR) to board (B-WL5M-SUBG1), flash firmware to STM32WL5MOC.
  • Command to LoRaWAN_AT_Slave application: AT+JOIN=1 (OTAA join).
  • Wait until it has joined.
  • Measure current consumption of the board over jumper JP2 (IDD) -> 89 uA.
  • Same current consumption has been measured with the application "LoRaWAN_End_Node" (change in file sys_conf.h: SENSOR_ENABLED = 0).

Thanks!

alexemdesgagneBest answer
Associate II
May 28, 2024

Hi,
To resolve this issue, we pull the UART TX and RX pins high.

Maybe that could help you.

Alexandre

JBive.1
JBive.1Author
Associate II
May 29, 2024

Hello Alexandre,

Thank you very much for your hint, you nailed it!

We changed two things:

  • Pull-up on UART RX (PA3)
  • Pull-down on JTDI (PA15)

This way, the idle current consumption went down to 1.9 uA! We are very happy with this.

Details:

Projects/B-WL5M-SUBG1/Applications/LoRaWAN/LoRaWAN_AT_Slave/Core/Src/usart.c: change:

 GPIO_InitStruct.Pin = USARTx_RX_Pin|USARTx_TX_Pin;
 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
 GPIO_InitStruct.Pull = GPIO_PULLUP; // <-- changed
 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
 GPIO_InitStruct.Alternate = GPIO_AF8_LPUART1;
 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

Projects/B-WL5M-SUBG1/Applications/LoRaWAN/LoRaWAN_AT_Slave/Core/Src/gpio.c: add in function MX_GPIO_Init():

 /* Configure GPIO pin : JTDI */
 GPIO_InitStruct.Pin = GPIO_PIN_15;
 GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
 GPIO_InitStruct.Pull = GPIO_PULLDOWN;
 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

The same changes can be applied to Projects/B-WL5M-SUBG1/Applications/LoRaWAN/LoRaWAN_End_Node as well.

Thanks again!

Associate II
May 29, 2024

Excellent!

Happy to hear this news!

Alexandre