Sometimes your app needs to persist data between reboots. Just a simple collection of data. Adding an external EEPROM just for this isn't something that you want to do. A bunch of extra complication, wiring, more code, board real state and (if this is a commercial project) more cost into the BOM.
STM32 SoC have a RAM area called backup memory, powered by the RTC power pin that survives reboots. This is the perfect tool for this.
The nanoFramework.Hardware.Stm32 class library abstracts all the required configuration and complication on using this memory. You simply throw it the values that you need to save (there a bunch of native types supported so you should find the ones that you require) and that's it. Providing that you've connected power to the Vbatt pin, that is.
When needed just get back to that API and read back those values.
How cool is this? ;-)






Comments