Main Site Documentation

G120HDR Use flash storage


#1

I picked up a G120HDR and I’m trying to write a few settings into the flash storage through .NETMF code. I’ve tried to search to see if this is possible but the only examples I’ve found are through the GHIElectronics.NETMF.Hardware namespace which I can’t seem to find. I just updated the G120 to the latest firmware.

Is this possible to do or do I need to get an SD card module and use that?

Thanks!


#2

@ bdowden - As of 4.2 the assemblies and namespaces have changed to GHI.Premium.. You can also use ExtendedWeakReference read/write to the flash memory, I do not have a G120 but I am sure EWR is implemented.


#3

@ bdowden - As taylorza said, ExtendedWeakReference will work, depending on how much data you are wishing to store there. The G120 does not have a user-writable flash storage (such as NAND), and anything outside the scope of ExtendedWeakReference will need other storage devices such as the SD card module.


#4

@ bdowden - Btw. You can also use the Flash Module
http://www.ghielectronics.com/catalog/product/389
http://wiki.tinyclr.com/index.php?title=FLASH_Module


#5

Great, thanks for the help. I’ll try using EWR and if I need more space I’ll get the SD module.


#6

Ok for those who are expending several hours finding a solution to this problem to save permanent data (like me).

[ol]Use the example from Micro Framework
After setting the target of the weak reference call: GHI.Premium.System.Util.FlushExtendedWeakReferences()[/ol]

As you see there is the full path to the library, you need to add GHI.Premiun.System to your project.
This should work fine after reboot, power off etc. no soft reboot required.