Save data on power down
-
- Posts: 24
- Joined: Wed Jan 02, 2019 11:45 am
Re: Save data on power down
I was accidentally looking at the PYB1.0 picture in the quick reference where there is no VBACK. I have PYB1.1 so after getting the correct picture I added a CR2032 to VBACK and which is working fine with the code you provided. I still can't find any documentation on the stm-module.
Re: Save data on power down
I was sure it existed in the docs. But it is in the Wiki: http://wiki.micropython.org/platforms/b ... ard/modstm
-
- Posts: 24
- Joined: Wed Jan 02, 2019 11:45 am
Re: Save data on power down
Saving a number to stm.mem32[stm.RTC+stm.RTC_BKP9R] on power down is working fine, but I need to save another number too which can fit in 16 bits. Is there room for another number and if so, what is the address?
The Wiki: http://wiki.micropython.org/platforms/b ... ard/modstm won't let me access http://wiki.micropython.org/platforms/b ... -const-rtc. It's asking me to sign in so I could not check the documentation.
The Wiki: http://wiki.micropython.org/platforms/b ... ard/modstm won't let me access http://wiki.micropython.org/platforms/b ... -const-rtc. It's asking me to sign in so I could not check the documentation.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Save data on power down
The battery backed RAM is 4KiB of contiguous space. You'll find some tips on accessing it here.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Save data on power down
So far MicroPython uses only two of the RTC 32-bit backup registers available (20 on Pyboard, 32 on PYBD).
On a PYBV11 BKP1R..BKB18R are available for general usage.Keeping data inside RTC avoids powering backup RAM.
On a PYBV11 BKP1R..BKB18R are available for general usage.Keeping data inside RTC avoids powering backup RAM.