3:59 pm
April 17, 2016
The Arduino Due offers a powerful ARM processor (32 bit, 84MHz) and 512kB of flash for big programs, but it has no EEPROM. If you need persistent storage that can be programmatically updated in the field, this can be a problem.
Fortunately a library was developed by a clever user that allows writing and reading to the Due's flash (see https://github.com/sebnil/DueF.....ashStorage). With Steffan's immense help (see https://www.geverywhere.com/for.....rary/#p812) I've ported this to subVIs that are really easy to use.
The ported library is available at https://www.dropbox.com/s/xlv3.....e.zip?dl=1.
Its two subVIs are simply "read.vi" and "write.vi". You specify an address; the compiler automatically offsets this into uncommitted storage so there is no risk of touching your sketch's space. So, an address of 0 represents the first byte of flash after your sketch's space.
There is also a demonstration VI, "dueFlashStorage blinker.vi", which runs a loop that writes the iteration number to flash, reads it back, and blinks an onboard LED that number of times.
I hope this is useful to others in the community.
26
1 Guest(s)