Muon randomly stops executing

Currently beta testing Muon v0.0.5 with M404 M-SoM.

Configuration:

  1. OS 5.9.0
  2. Battery connected
  3. No ethernet connection
  4. Both Wifi and cellular antennas connected
  5. WiFi.prefer() statement implemented
  6. Particle console shows signal strength and quality metrics for cellular
  7. USB-C power cord connected to USB-C port on Macbook laptop
  8. Visual Studio Code open and terminal window up showing serial output from board

Just running the loop below and the board will randomly lock up with the onboard status LED showing solid cyan, stopped breathing. No response to viewing variables or function calls via console. Runtime can be anywhere from 1 hour to 30 before lockup. Only option is to reboot.

//**** Test code to check runtime stability of Muon. Muon randomly locking up ****
void loop() {
loop_counter += 1;
curDate = (Time.format(Time.now(), "%Y-%m-%d"));
curTime = (Time.format(Time.now(), "%I:%M:%S %p"));
Serial.printlnf("Current Date: %s Time: %s Loop Count: %d", curDate.c_str(), curTime.c_str(), loop_counter);
delay(1min);
}

Hi, can you provide the full code?

Does it also happen if you change the Serial.printlnf to Log.info()?

Cheers

Hi, FYI I have been running this code for 22 hours and still running fine.

This is my code below, I added a Particle variable to check from the cloud as well.
Only difference with your setup is that I have the GNSS antenna connected.

#include "Particle.h"

SYSTEM_MODE(AUTOMATIC);
SYSTEM_THREAD(ENABLED);
SerialLogHandler logHandler(LOG_LEVEL_INFO);

int loop_counter;
String curDate;
String curTime;

void setup()
{
  WiFi.prefer();
  Particle.variable("loop_counter", loop_counter);
}

void loop()
{
  loop_counter += 1;
  curDate = (Time.format(Time.now(), "%Y-%m-%d"));
  curTime = (Time.format(Time.now(), "%I:%M:%S %p"));
  Serial.printlnf("Current Date: %s Time: %s Loop Count: %d", curDate.c_str(), curTime.c_str(), loop_counter);
  delay(1min);
}

Thanks for the follow up. I changed the serial to use logging instead. I also removed the cellular antenna and issued the Cellular.off() command. My system still locked up around 9 hours. When it locked up, the onboard status LED was solid green. I have now been contacted directly by Particle and asked to send my beta testing info into them for review. Just to finish this thread, I am going to install your exact code into my Muon and retest.

that's bad, please let us know what you find. Thanks!