Pages: [1]   Go Down
Author Topic: How I can read and write data to flash memory?  (Read 1688 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello.
How I can read and write data to flash memory?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


with AVRDUDE.exe you can read and write flash from your PC,

you can read from it with PROGMEM (functions) from within a program. (google is your friend)

you cannot write to it from within a program.

[edit]
The above is true for UNO, I noticed this is DUE for which I expect the same is true, but maybe it is not. (sorry)
« Last Edit: November 17, 2012, 10:01:20 am by robtillaart » Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Forum Administrator
Milano, Italy
Offline Offline
Sr. Member
*****
Karma: 23
Posts: 292
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Once programmed, the CPU runs your program and not the bootloader, and you can't read the flash.

If you press the "ERASE" button a flag bit is erased inside a system register and that makes the bootloader start again (instead of your program), but I don't know if the flash memory is erased too. If not you can use bossac to read the flash memory again, but you have to try it to discover if its possible.

C
Logged

C.

Germany
Offline Offline
Full Member
***
Karma: 10
Posts: 230
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe someone can tweak the firmware from the 16u2 to let the SRam used by the SAM.
Logged

Pages: [1]   Go Up
Jump to: