Hi Forum ,hi Dave,
I'm working on an application for displaying data from an solarcontroller ("epever").
HW is an esp8266.
I have it running, using (in this case) two tasks and mongoose as webserver-lib.
But after a few minutes the tasks stop beeing executed.
Last known RAM conditions seem OK.
Webserver still working and reponds in full.
So i'm a bit lost where to look.
Any hints are very much appreciated.
Thank you !
Bitz
Here is part of the log:
19:47:44.790 > Heap: / free Heap: 26680 / f: 4%
19:47:49.786 > ============> tmEventsUpdateInfoTask exec
19:47:49.797 > ============> MCUupdateInfoTask exec
19:47:50.739 > RRRFFFFFFFFFFFFF
19:47:54.796 > ============> tmEventsUpdateInfoTask exec
19:47:54.805 > ============> MCUupdateInfoTask exec
19:47:59.805 > ============> tmEventsUpdateInfoTask exec
19:47:59.815 > ============> MCUupdateInfoTask exec
19:48:04.814 > ============> tmEventsUpdateInfoTask exec
19:48:04.823 > Time Event: 18.02.2023 / 19:48 h (Night)
19:48:04.826 > updating time
19:48:04.826 > ============> MCUupdateInfoTask exec
19:48:09.824 > ============> tmEventsUpdateInfoTask exec
19:48:09.834 > ============> MCUupdateInfoTask exec
19:48:14.833 > ============> tmEventsUpdateInfoTask exec
19:48:14.842 > ============> MCUupdateInfoTask exec
19:48:19.842 > ============> tmEventsUpdateInfoTask exec
19:48:19.852 > ============> MCUupdateInfoTask exec
19:48:24.851 > ============> tmEventsUpdateInfoTask exec
19:48:24.862 > ============> MCUupdateInfoTask exec
19:48:29.860 > ============> tmEventsUpdateInfoTask exec
19:48:29.870 > ============> MCUupdateInfoTask exec
19:48:34.870 > ============> tmEventsUpdateInfoTask exec
19:48:34.879 > ============> MCUupdateInfoTask exec
19:48:39.879 > ============> tmEventsUpdateInfoTask exec
19:48:39.888 > ============> MCUupdateInfoTask exec
19:48:43.122 > RRRFFFFFFFFFFFFF
19:48:44.888 > ============> tmEventsUpdateInfoTask exec
19:48:44.897 > ============> MCUupdateInfoTask exec
19:48:49.897 > ============> tmEventsUpdateInfoTask exec
19:48:49.906 > ============> MCUupdateInfoTask exec
19:48:54.906 > ============> tmEventsUpdateInfoTask exec
19:48:54.916 > ============> MCUupdateInfoTask exec
19:48:59.915 > ============> tmEventsUpdateInfoTask exec
19:48:59.925 > ============> MCUupdateInfoTask exec
19:49:04.924 > ============> tmEventsUpdateInfoTask exec
19:49:04.933 > Time Event: 18.02.2023 / 19:49 h (Night)
19:49:04.936 > updating time
19:49:04.936 > ============> MCUupdateInfoTask exec
19:49:09.934 > ============> tmEventsUpdateInfoTask exec
19:49:09.944 > ============> MCUupdateInfoTask exec
19:49:14.943 > ============> tmEventsUpdateInfoTask exec
19:49:14.953 > ============> MCUupdateInfoTask exec
19:49:36.065 > RRRFFFFFFFFFFFFF
19:50:29.649 > RRRFFFFFFFFFFFFF
19:51:23.303 > RRRFFFFFFFFFFFFF
19:52:16.968 > RRRFFFFFFFFFFFFF
19:53:10.643 > RRRFFFFFFFFFFFFF
Here a small code sample, the loop():
void loop() {
taskManager.runLoop();
webServer.Mongoose_poll();
if (restartnow)
{
Serial.println("Restart");
delay(1000);
ESP.restart();
}
loopCount++;
if (loopCount > 500000)
{
// DBGN("============> MCUsleepTask exec");
Serial.println(taskManager.checkAvailableSlots(taskDebugData, sizeof taskDebugData));
loopCount = 0;
}
notifyWebClients_loop();
}
And one of the tasks:
class cTask : public Executable { // from/for taskmanager
protected:
unsigned long cycleTimeUs;
bool taskEnabled = false;
taskid_t taskID = TASKMGR_INVALIDID;
public:
void start();
};
class cMCUupdateInfoTask : public cTask {
//private:,
public:
void start(unsigned long intervalUS) {
Serial.print(("start MCUupdateInfoTask: ("));
Serial.print(intervalUS / 1000000);
Serial.println("s)");
taskEnabled = true;
cycleTimeUs = intervalUS; ///2 secs
taskID = taskManager.scheduleFixedRate(cycleTimeUs, this, TIME_MICROS);
}
void exec() override {
DBGN("============> MCUupdateInfoTask exec");
mcu.updateMCUinfo();
}
};
extern cMCUupdateInfoTask MCUupdateInfoTask; ;