Using Retained memory to the max.?

The retained memory requirements of my Photon-application exceeds the available 3068 bytes that is available. on the device.
As it is a Photon, I might add a coincell battery to VBAT, but will that effectively extend the amount of retained memory???

When applying a coincell battery, will I still have to declare the variables as “retained”, or might that result into failing compilation of the code because of exceeding the 3068 bytes???
Or should I NOT declare these variables as “retained” at all, just because battery backup is available?
Is there a need for declaring “retained” variables anyway when there is battery backup available?
And how much memory is actually available as backup during resets when applying a battery on VBAt?
.

No, it will not - an external battery is not capable of rewiring the controller's silicon internally.
The battery only keeps the dedicated backup RAM powered even when the USB power gets disconnected.
The retained keyword only ensures that the respective variable gets placed in that special part of memory space.

You may want to (re)read the entire Backup RAM reference documentation

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.