persistent memory?!?

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply

kevinkk525
Posts: 969
Joined: Sat Feb 03, 2018 7:02 pm

Re: persistent memory?!?

Post by kevinkk525 » Fri Oct 19, 2018 10:59 am

as described in this thread viewtopic.php?t=3154 it is possible to use rtc memory (don't know how many bytes you can store in there), but it won't survive a power disconnect, only a reset.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

chuckbook
Posts: 135
Joined: Fri Oct 30, 2015 11:55 pm

Re: persistent memory?!?

Post by chuckbook » Fri Oct 19, 2018 11:41 am

On a pyboard there are 4Kbytes of NVRAM. It survives a power cycle as long as VBACK is active.

User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Re: persistent memory?!?

Post by devnull » Fri Oct 19, 2018 1:51 pm


jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: persistent memory?!?

Post by jickster » Fri Oct 19, 2018 2:08 pm

There’s no dedicated api for writing to readonly menory


Sent from my iPhone using Tapatalk Pro

jedie
Posts: 252
Joined: Fri Jan 29, 2016 12:32 pm
Contact:

Re: persistent memory?!?

Post by jedie » Fri Oct 19, 2018 5:36 pm

RTC memory seems not to work on Odroid Go with ESP32 LoBo v3.2.24

Values set with rtc.write_string() are deleted after soft reset.

Does the Odroid Go has NVRAM? It has 4MB PSRAM... Is it battery buffered RAM ? Any how to read/write it from micropython?

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: persistent memory?!?

Post by loboris » Fri Oct 19, 2018 6:38 pm

jedie wrote:
Fri Oct 19, 2018 5:36 pm
RTC memory seems not to work on Odroid Go with ESP32 LoBo v3.2.24

Values set with rtc.write_string() are deleted after soft reset.

Does the Odroid Go has NVRAM? It has 4MB PSRAM... Is it battery buffered RAM ? Any how to read/write it from micropython?
RTC memory is preserved only after deepsleep reset.
You can use machine.deepsleep() with a very short sleep time (for eaxmple 1 ms) instead of soft reset. The system will be reset and all RTC variables preserved.

You can also use ESP32 NVS (Non-volatile storage) to store various variable types. The variables value will be preserved after any kind of reset (even if the power is removed).
NVS is part of the Flash memory.
See the Wiki for more details.

Post Reply