Description
- I am running the latest version of this repository (dependencies too)
- I checked the documentation and found no answer
- I checked to make sure that this issue has not already been created
Expected Behavior
After setting modem.begin(EU868)
and LowPower.deepSleep()
it goes sleep, and the chip will not wake up.
Current Behavior
After setting modem.begin(EU868)
and LowPower.deepSleep()
it goes sleep, but after around 900ms it wakes up.
If modem.begin(EU868)
isn't used then it works as intended, and the chip will not wake up.
Minimal example
#include <Arduino.h>
#include <STM32LoRaWAN.h>
#include <STM32RTC.h>
#include "STM32LowPower.h"
STM32RTC& rtc = STM32RTC::getInstance();
STM32LoRaWAN modem;
void setup() {
Serial.begin(115200);
modem.begin(EU868);
LowPower.begin();
LowPower.deepSleep();
}
void loop() {
Serial.begin(115200);
Serial.println("wakes up");
delay(1000);
LowPower.deepSleep();
}
Power Profiler screenshot with modem.begin()
Power Profiler screenshot without modem.begin()
Details (what I tried)
I tried to look on
STM32LoRaWAN/src/STM32LoRaWAN.cpp
Lines 62 to 81 in 192c123
rtc.detachInterrupt, rtc.detachSecondsInterrupt, rtc.disableAlarm (both A ,B), but none of it worked.
Only when I after modem.begin() called rtc.end() and then rtc.begin() it stops waking up, but after joining the network (which was successfull), modem.send() didn't send any message (propably some problem with RTC settings that should have been set in modem.begin() and was cleared after rtc.end())
Context
I'm using supported LORA-E5 chip (STM32WLE5JC) on custom PCB
platformio.ini:
[env:lora_e5_mini]
platform = ststm32
board = lora_e5_mini
framework = arduino
lib_deps =
https://github.com/stm32duino/STM32LoRaWAN.git#0.2.0
https://github.com/stm32duino/STM32RTC.git#1.4.0
https://github.com/stm32duino/STM32LowPower.git#5ae219c
monitor_speed = 115200
monitor_filters = time
upload_protocol = stlink
debug_tool = stlink
Metadata
Metadata
Assignees
Labels
Type
Projects
Status