Can the empty space on Flash be used to store settings
AndyProp
Posts: 60
in Propeller 2
When flashing any program to the flash with Proptool, Flexprop, Tachoz etc
is the flash empty space left intact, or erased each time?
I have a handful of values that I prefer to store in flash if possible
The next question would be how to see how much space is on the flash for such user data, and then how to W/R some test data starting at the extreams of the flash space.
Finally, JonnyMac described in a post that the Flash chips have some unique serial that can be read, anyone know how to do that in a few lines of code.

Comments
Andy, I save and load configuration items to and from SD and I am sure you can do the same with flash. Here is the memory structure and how I load and save those values. If I need to add a new config item, which I did, I place the new config variable after the last one, and then update the last one in the read/write data object to determine how many bytes to load.
I highly suspect you can do a similar thing with Chip's Flash filesystem.
long PIXELCONFIG[124] long E131CONFIG[432] byte MACADDRESS[6] ' Must be unique per layer 2 network byte IPADDRESS[4] byte SUBNETMASK[4] byte GATEWAY[4] byte DHCP 'Non zero byte BRIGHTNESS byte DNS[4] byte SPEEDDUPLEXif not \FS.openfile(string("blitzen.cfg"),"R") debug("Opened") FS.readData(@PIXELCONFIG, @SPEEDDUPLEX - @PIXELCONFIG + 1) FS.closeFile()pub writeconfig() if not \FS.openfile(string("blitzen.cfg"),"W") debug("Writing Configuration to SD Card.", $0D, $0A) FS.writeData(@PIXELCONFIG, @SPEEDDUPLEX - @PIXELCONFIG + 1) FS.closeFile() else debug("Unable to write config. Aborting.", $0D, $0A) abortHere is a link to the flash filesystem.
https://obex.parallax.com/obex/p2-flash-filesystem/
The attached demo will get you started. If you want to write and read standard files, Chip wrote a file system for the flash that is maintained by Steven Moraco. You will find threads about it with a quick search.