RAK3172 low leve development for end node cannot achieve low current

I had bought a RAK3172 module and working fine with with AT command . I had config the modulework to AS923 , OTTA and sucess connect to thingsnetwork .

The module is just with a switch connect to PA0, and 2 wires from LUART2 +GND connect to USB type (UART-RS232) adaptor to PC. However the the current consumption is terrible even I unplug the UART port connect to PC.

I following the instruction on web use the low level development methodby copying the end node examples from ST and make the change accordingly, however the average during TX-RX is more than 30mA, that doesan;t matter , however the idle current is around 1mA instead of few uA , I had try many method, including GND all the RX pin of UART ports, it did not have any impove.

I try to use the command “HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);” put the main(0 while loop , the results is the same. I disable the MX_LoRaWAN_Init() in the main.c, it drop to less than 10uA.

is there anyone know what happen ?

Welcome to the forum @rocky56hk1

Are you writing your code with STM32CubeIDE?
If yes, please have a look into our Low Level Development Guide.
But as this is all based on STMicroelectronics sources, we cannot give further support than how to adjust the radio settings.

As an alternative, you might have a look into our RAK Unified Interface RUI3:
RUI3 is an API that makes it easy to develop custom firmware for RAK modules. It handles the complete low level hardware interface and the firmware can be written with Arduino framework style API calls.

It supports the following IDE’s:

Arduino IDE
Visual Studio with Arduino extension
Visual Studio Code with Arduino extension

Here are the links to the documentation and examples source codes:
RUI3 overview: RAKwireless Unified Interface V3 (RUI3) | RAKwireless Documentation Center
RUI3 API documentation: Arduino API | RAKwireless Documentation Center
RUI3 BSP installation guide: RUI3 Supported IDE | RAKwireless Documentation Center
RUI3 BSP examples: RAK-nRF52-RUI/libraries/RUI_V3_examples at main · RAKWireless/RAK-nRF52-RUI · GitHub

Other RUI3 examples:


Thank your information.Yes, I am using STM32cubeIDE. I am sure I will try to use RUI3 to see it can meet my power comsumption buget. However, my final application will be more complcated other than a switch which, i really wondering whetering RUI 3 can handle it.
For the ST’s STM32WL end node examples, it seem that the problem is happening within the the sequencer task at lora_app.c. Anyone can me a hint is appreciate


we cannot support the example code provided by STM, you have to ask them.

You can check my repo for producing a working demo with STM32cubeIDE

1 Like

priblem solved, thank your help.

在 2022年11月14日 週一 17:27,aeadf via RAKwireless Forum <[email protected]> 寫道:

Many thank your information. I will take a look about it.
By the way, I had sucessed intergerate the AT and end node exmple into the RAK3172 module and compile with with STM32cubeIDE. After entering stop2 mode, the RAK3172 current consumption just drop to 0.25uA, really amazing, however it did not wake up after entering the stop2 mode, do you know how to wake up the LUART port from receiving the AT command ?

Also, does the module have battery reverse protection so that I don’t add it in my product?

The reason why i need the AT command for my end node device is
allow user change the appEUI, Join EUI…etc when work with thingsnetowork. Also we want save some calibration data into the sensor during the production.

Hi @rocky56hk1 ,

There is no reverse polarity protection in RAK3172 internal schematic. You have to add it into your board design.

Regarding STM32CubeIDE issues, we have limited support on that one. Our engineering efforts are focused on the RUI3 FW framework. This is a more scalable approach for us as a company since we support multiple chips in our product range - STM32, NRF32, etc. If the sensors you have are I2C-based, RUI3 can support those.

Btw, maybe you can repost the AT and end node example inquires on STM32WL sdk to STM32 forum or customer support as well. They might be able to give help on their example codes.