Programming LoRa-E5 with Arduino, Grove-LoRa-E5 sleep current 0.7uA

In the link below I have investigated how low the sleep current can be when configured using the XIAO_nRF52840 as the host controller and using only AT commands and posted that it is 6.4uA.
https://forum.seeedstudio.com/t/node-using-xiao-nrf52840-and-grove-lora-e5-running-on-at-commands-sleep-current-6-4ua /273830’

The Wiki has an example of LowPower using the STM32CubeIDE without AT commands, but the STM32CubeIDE is too complicated for me. So I investigated how to program the LoRA-E5 using the familiar ArduinoIDE. I found that LoRa communication and LowPower can be realized on Arduino by using the libraries, “RadioLib”, “STM32RTC” and “STM32LowPower”. Since there is no host controller, 0.7uA standby current can be realized. However, LDOs with high current consumption are removed.

This is the sketch used for the experiment.
STM32WL_TX_ShutdownCurrent.zip (1.7 KB)

When compiled with ArduinoIDE2, the hex file is created in the folder below. Select and write the file with STA32CubeProgrammer.
In case of Windows
C:\Users\username\AppData\Local\Temp\arduino\sketches\32 digit HEX string\sketchname.ino.hex
In case of Linux
/tmp/arduino/sketches/32 digit HEX string/sketchname.ino.hex

IDE :          ArduinoIDE 2.2.1
BSP :          STM32 boards groups by STMicroelectronics 2.7.1
               Borad select  STM Boards groups / LoRa boars
               Board part number  LoRa-E5 mini (from Tools submenu 'Board part number')
Programmer :   STM32CubeProgrammer
Uploader :     ST-Link V2
Library :      RadioLib 6.4.1 https://github.com/jgromes/RadioLib
               STM32LowPower  1.2.5 https://github.com/stm32duino/STM32LowPower
               STM32RTC 1.4.0 https://github.com/stm32duino/STM32RTC
Profiler :     nRF PPK2

2 Likes