I have a firmware running on DeviceOS 3.2.0 with classes declared and initialized in the global space of the ino file, declared right before (and certainly outside) the setup() function.
One of these classes has a constructor that wants to save to EEPROM and the original developer wanted to protect the eeprom save from updates, or that’s what I suspect, like so:
System.disableUpdates();
EEPROM.put(addr,whatever_data);
System.enableUpdates();
I ended up nailing the SOS - Hard Fault (1 blink between 2 SOS patterns) (one blink red) on the System.disableUpdates();
This happens in a firmware like this:
MyClass _myClass;
setup()
{
blahblah;
}
loop()
{
blahblah2;
}
and in MyClass constructor:
MyClass::MyClass()
{
System.disableUpdates(); <<== this ends in SOS
EEPROM.put(addr,whatever_data);
System.enableUpdates();
}
I’m 100% sure this happens on DeviceOS 3.2.0.
90% sure this happens on DEviceOS 3.1.0.
Is this behavior normal for some reason or DeviceOS could be at fault?
Thanks!