Hi guys, we are having trouble updating a batch of devices where we have significantly changed SRAM variables. After update they tend to panic reset. We can catch this and boot to safe mode but of course SRAM is retained. As they are located around the country plus covid, it will be difficult to power them off. Is there an easy way to programmatically clear the SRAM and start afresh?
Ideally looking for something similar to EEPROM.clear()
Otherwise do you think something like this should work?
STARTUP(System.enableFeature(FEATURE_RETAINED_MEMORY));
retained byte SRAMcontents[3068];
void setup() {
memset(SRAMcontents, 0, sizeof(SRAMcontents));
}