Persisting information across reboots without external SD or Extended Weak References

Is it possible to persist information across reboots on a FEZ Cerb40 board without connecting an external SD card or via Extended Weak References (unsupported in the Cerb Family)? Can any of the processor’s flash memory be allocated as “block storage” for this purpose?

@ wault - You can look into https://www.ghielectronics.com/downloads/man/Library_Documentation_v4.3/html/T_GHI_Processor_Configuration.htm which was added in the 2015 SDK.

@ John - Do you have a quick table which boards supports this feature, and how many bytes each of them can store?

@ Reinhard Ostermeier - if you are asking how many bytes then you are looking at this the wrong way. This should not be used for more than few bytes to hold your custom configuration, few hundred bytes should be okay.

All devices support this (hydra is different of course)

@ Gus - I guessed that it wouldn’t be in the kBytes.
But knowing how much might be good if you want to be sure not loose any data.
Needing 101 bytes, where only 100 bytes are available would be bad.

@ Reinhard Ostermeier - There isn’t an exact limit. It depends what else is stored in configuration, how much the internal driver is able to compact the sector, and which device you use. The config region itself on say the G80 is 16KB. Subtract off various internal configuration entries like network and display along with the entry headers and you get a few kilobytes at most. WriteEntry returns a bool so you can tell whether or not it was written.

Once the data is in configuration, you don’t want to worry about it going away like you do with EWR, unless you reflash the config file.

1 Like

@ John - Ok, then I will see when I use it.

I tested the Configuration class with and it worked great, but… I remembered hearing that 4.3 NetMF is not supported for commercial use within the Cerb-family.

First, is this still true? I’m looking to apply this functionality to several hundred units for commercial use.

Otherwise, is there another way to persist information within the 4.2 NetMF?

Let’s say I wanted to wipe out a configuration entry. Is there a way to reset the configuration data? Or should I just write a blank byte array with Configuration.TotalSize bytes

Configuration.Write(new byte[Configuration.TotalSize])?

So the only way to reset the configuration completely is to re-flash the firmware?

@ Mr. John Smith - to remove an entry you’ll want to call WriteEntry with an empty array. If you want to reset the entire configuration, you need to reflash the whole sector either through writing the config file with this class or MFDeploy.

@ Gus - Can you clarify what you mean by Hydra being different? I’m trying to save some settings on my Hydra and not having any success. Rather not have to add the SD card if I don’t have to.