[riot-users] Lorawan stack with low powermode not fully working with STM32 mcu
Noël Le Moult
noel.lemoult at dfxlab.fr
Mon Jul 15 19:01:21 CEST 2019
Thanks for the provided links !
I will try the custom pin modes on spi to minimize power consumption and see if the power consumption is improved.
Any clues for the i2c gpio configuration to disable pull up before entering STOP mode ?
If there is no easy solution I will remove my external pull up resistors and see if the is some improvements.
âââââââ Original Message âââââââ
Le lundi, juillet 15, 2019 6:38 PM, Alexandre Abadie <alexandre.abadie at inria.fr> a Ã©crit :
> Hi NoÃ«l,
> Thanks for your comments on RIOT and on my online course on GitHub.
> Regarding low power with loramac on the murata chip, you can have a look at  and .
> The first pr improves the lorawan example application with context persistence on EEPROM, thus allowing OTAA with STOP power mode. Note tha low power modes are enabled by default.
> The second pr is meant to improve power consumption on STMs.
> Let us know how much power consumption you can reach with them.
>  https://github.com/RIOT-OS/RIOT/pull/11237
>  https://github.com/RIOT-OS/RIOT/pull/11542
> Le 15 juil. 2019 5:47 PM, NoÃ«l Le Moult <noel.lemoult at dfxlab.fr> a Ã©crit :
>> I use the CMWX1ZZABZ-091 murata module in some LoraWan applications with the following tools : VScode + PlatformIO + STM32cube HAL + I-CUBE-LRWAN lora stack. It works and I get some interresting results : Lora class A configuration, data is sent every 5 min, power consumption <5ÂµA most of the time. I get the following measurements : ... > Sleep (5ÂµA) > Tx > Sleep (5ÂµA) > Rx1 > Sleep (5ÂµA) > Rx2 > Sleep (5ÂµA) > ...
>> As I discovered RIOT-OS few month ago and this OS seems to be very nice I try to learn and use it for my next projects.
>> I spend some time learning how to use RIOT, thanks to the high quality slides and examples provided by a.abadie and I get nice results with the provided examples.
>> I tried some RIOT examples / test programs and I did not manage to get similar results that I get with STM32Cube HAL + provided Lora stack.
>> 1) When I compile the examples/lorawan program there is no low power mode activated by default. The power consumption is about 5.6mA when idle.
>> 2) Low power mode 0 and 1 with RTC seems to work as I get some nice results with tests/periph_pm program:
>> - mode 1 with rtc : 44ÂµA and its resume from RTC with sucess
>> - mode 0 with rtc : 1.2ÂµA and its resume from RTC with sucess but reboots the MCU.
>> I observe that I previously get about 5ÂµA without reboot. Is there some way to do that with RIOT ?
>> 3) I tried the riot-course-exercises/riot-lorawan/pm program provided by aabadi on his github and I get the following results :
>> - mode 1 : 1.2mA in sleep mode without reboot
>> - mode 0 : 1.2ÂµA in sleep mode with reboot
>> I observe that the i2c pull up resistor are not desactivated in mode 1 during sleep. It can explained the 1.mA observed as it will power some external component on my board. Is there a way to disable the internal pull resistors of i2c bus ?
>> To be noted, I had to add CFLAGS += -DMODULE_SEMTECH_LORAMAC_RX in my makefile to be able to build without error, otherwise the semtech_loramac_recv() function introduce some build errors.
>> To conclude, the results are encouraging with RIOT OS but there is still some minor issue that prevent me to use it for my next design :
>> Power consumption in sleep mode should be lower than 10ÂµA and it would be more pratical not to use the low power mode 0 to avoid board reboot and context loss.
>> In mode 1, I get the following behavior : ... > Sleep (1.2mA) > Tx > Idle (7.6mA) > Rx1 > Idle (7.6mA) > Rx2 > Sleep (1.2mA) > ...
>> when compared to the behavior I get with the STM32cube HAL we did not sleep prior Rx1 and Rx2 events, resulting in some additionnal losses. Is there a way to improve this behavior ?
>> My measurements are done using OTII hardware solution on my custom designed board, with UART and probe linked unplugged.
>> I can perform additionnal measurements on B-L072Z-LRWAN1 board or SAMR34Xplained board if needed.
>> I would appreciate any suggestion to help my reduce my overall power consumption using the RIOT lorawan stack ^^
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users