Retained variable not retained on Electron after SLEEP_MODE_DEEP

Since I can’t duplicate your issue with any of my Electrons (not even betas) I’ve no other ideas (yet).
The reason why I asked for your power supply, if you hadn’t attached the LiPo but used something like a smart powerbank, these tend to switch off supply after a periode of low current draw, hence the retained variables might slowly die off, that was also the background for shortening the sleep time.
But with your setup,this shouldn’t be an issue.

About the missing VBAT bridge, that might not require you to alter the device. There have been requests for devices without that bridge populated (for a distinct batch) but maybe the odd one or two slipped through into another batch. So checking the resistance between 3v3 and VBAT will be a way to tick that off for definite.

I found the problem. It’s really dumb, but well - at least I got it now.

I will describe it later - it was a really stupid and obvious mistake -.-
thank you for the fast replies and trying to help me with my issue @ScruffR and @rickkas7
You guys are amazing

1 Like

Reading your deleted post, I guess the reason is connected to that question very early in the conversation

The point is that there is no hardware difference (meaning between individual Electrons) but each of your Electrons has its own system firmware version installed and you can select a target version for each of your devices individually.
So if you targeted a device that was set 0.5.0 or before your binary would not support retained fully, even if the system on the actual device receiving that binary has a system greater 0.5.0.
Otherway round, if you target a version greater than the installed version your device will go into Safe Mode.

Okay, just to get back to what you wrote.
It’s exactly what you write.

There was the right firmware installed on all of them, but the cloud building environment was not aware of that since some of them had not talked to the cloud at that point.
It did not really check that since I was expecting the cloud to know…

Maybe as a suggestion - it would have saved me a lot of time:

The firmware version stored in the cloud would be updated when flashing a new firmware to the device
or
There could be a warning when attempting to flash code to a device that has been compiled for another firmware version.

Anyways, you guys have been a gerat help!

1 Like

There are multiple ways to flash firmware, even ones the cloud can't know about (via cable).

And

There is. If you flash incompatible app firmware the device goes into Safe Mode to tell about that.

In my case it didn’t. The code worked fine except for the retained variables…

Compatible is every app firmware that has a target version less or equal to the installed system version.

And to identify what version actually is on the device you need to ask the device direct via

# in DFU mode
particle serial identify 
# or
particle serial inspect

or via a serial terminal in Listening Mode via v