Logo

What can we help you with today?

Using battery-backed SRAM of the onboard RTC chip

Onboard peripherals

Using battery-backed SRAM of the onboard RTC chip

If you need your variables to survive power outages and reboots, there are 64 bytes of battery-backed memory available.

Last updated on 18 Apr, 2019

Raspbian (Linux)

You can access the SRAM via this file:

/sys/devices/platform/soc/3f804000.i2c/i2c-1/1-006f/nvram

Just keep in mind the limit of 64 bytes.

REXYGEN

In REXYGEN, there is an internal mechanism for handling persistent variables, which stores the values on a permanent storage medium (hard drive, SD card, eMMC, etc.).

Still, you can use the SILO function block to access the SRAM via this file:

/sys/devices/platform/soc/3f804000.i2c/i2c-1/1-006f/nvram

Keep in mind the limit of 64 bytes.

Codesys

It is recommended to use the MCP7941x library by Aliazzz.

Keep in mind the limit of 64 bytes.

Did you find this article helpful?