Useful library for reading/writing to non-volatile flash on the Due | Arduino Compatible Compiler for LabVIEW Discussions | Forum

Avatar
Please consider registering
guest
sp_LogInOut Log In sp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
Useful library for reading/writing to non-volatile flash on the Due
August 16, 2016
3:59 pm
Avatar
scottj
Member
Members
Forum Posts: 28
Member Since:
April 17, 2016
sp_UserOfflineSmall Offline

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.  

August 17, 2016
9:12 pm
Avatar
miche91
Member
Members
Forum Posts: 35
Member Since:
May 11, 2016
sp_UserOfflineSmall Offline

Amazing Scott!

 

thanks you very much

Forum Timezone: UTC 0
Most Users Ever Online: 100
Currently Online:
26
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
miche91: 33
scottj: 28
scadao: 23
Member Stats:
Guest Posters: 5
Members: 202
Moderators: 0
Admins: 3
Forum Stats:
Groups: 1
Forums: 2
Topics: 266
Posts: 1222
Newest Members:
pujacontrol
Administrators: geadmin: 22, filipealtoe: 96, Steffan: 356