I’m currently working with a low power stm32 MCU and an SX1276 (RFM 95 HOPE) with the Arduino LMIC Libaray changed to the used periphery. I want to use the standby mode, which has very low power, but also resets all contents of the chip. I can retain some memory and plan to do so, to avoid having to do a join request over and over.
Currently I’m saving the LMIC-Struct with its data content, but it does neither rejoin nor send a message at all (beyond the very first join and message). What else do I require to avoid rejoining over and over?
It’s the STM32L4R+. 3 micro amps is great, my personal best is 64µA. I should get even about 1 µA if it works like planned.
How did you do that? Does your MCU reset aswell? I’m currently using
This seems to be related to the absolute timing values stored in the LMIC struct. With that the node needs to wait until the clock value reaches those again when the MCU starts from reset. I did some experiments with that and found that before the LMIC struct is archived those fields need to be cleared:
May-be saving the timing and making sure the controller uses increasing time in stead of resetting is a better solution? Save time to nvram and add the increment when waking? By clearing the structure you open the potential to exceed legal airtime.
Usually, I dont use the tx_interval variable to declare when it has to send a lora message and do it somewhat external. I have a timer who stops the program for x minutes (either sleep/stop/standby mode). In stop-mode, all clocks except RTC (whose only task is to give an interrupt when stop mode is finished) are stopped. But in stop-mode, it still works and it still does send a message out to the world, while in standby it does not. In neither modes, the internal clock should provide a tick-interrupt, since every interrupt would wake it up from any sleep-stop-mode (except standby-mode) and has to be disabled.
Will keep it in mind, though I don’t want to reconfigure lorawan again from anew. My current lorawan-solution is also pretty suboptimal, since I took the arduino lmic some years ago and reconfigured it for STM32.
I strongly suggest you update to a recent version of LMIC or loramac-node as technology has moved on and old LMIC versions are not a great match for the current LoRaWAN networks, including TTN.
I will consider that if I get employed to work further on the project. Currently it is just a protoype for my master thesis and wanted to optimize it as good as possible.