Retained memory
Enabling backup RAM (SRAM)
On Gen 3 devices (B-Series SoM, Boron, Argon, Tracker SoM, Tracker One, E404X), retained memory is always enabled, regardless of the feature flag.
On the P2, Photon 2, and Tracker M (RTL872x), retained memory has limited support in Device OS 5.3.1 and later. See Retained memory for the cases in which it is saved. It is not supported in earlier versions.
On Gen 2 devices (E-Series, Photon, P1), backup RAM is disabled by default, since it does require some maintenance power which may not be desired on some low-powered projects. Backup RAM consumes roughly 5uA or less on VIN and 9uA or less on VBAT.
Backup RAM is enabled with this code in setup():
void setup()
{
System.enableFeature(FEATURE_RETAINED_MEMORY));
}