Node wake up from sleep too early
-
Hi,
I'm on my 16th node with mysensors (2.2.0) library and first time with this kind of issue. I have a sensor on Arduino Nano and in order to save battery, as usual, I use the sleep function:sleep(sleep_seconds_between_measures);
the variable value is 900000. The problem is, the node wake ups too early, the debug is:
Sleep for seconds: 900000 1116278 MCO:SLP:MS=900000,SMS=0,I1=255,M1=255,I2=255,M2=255 1116288 TSF:TDI:TSL 1116399 MCO:SLP:WUP=-1 1116401 TSF:TRI:TSB
so according to the log parser, values are correct and the node wakes up by the timer interrupt (1116399 MCO:SLP:WUP=-1), but it happens straight away after the sleep command.
Any clue? Can be any flag that should be reset used by the timer?
Thank you for your help.
-
- What type of unit is "sleep_seconds_between_measures"?
- Post the full code!
- Did you select the right type and clock speed when flashing the nano?
- 2.2.0 is an older version, current is 2.3.2, I suggest upgrade of all nodes and gateways to this latest standard.
1 out of 2
Suggested Topics
-
Day 1 - Status report
Announcements • 23 Mar 2014, 22:45 • hek 24 Mar 2014, 20:12 -
Echo request is not set
Troubleshooting • 12 Aug 2024, 15:36 • kamilb85 3 Sept 2024, 08:58 -
JSN-SR04T-V3.0 Coax cable extended
Troubleshooting • 23 days ago • bocalexandru 22 days ago -
Ghost Child
Troubleshooting • 28 days ago • FcNanoLed 24 days ago -
Compiling Sensor code using BME280 and ESP8266
Troubleshooting • 26 Feb 2025, 00:32 • dpcons 26 Feb 2025, 06:22 -
Getting system time from the controller
Troubleshooting • 27 Feb 2025, 01:39 • dpcons 3 Mar 2025, 01:00