Hello. How I can read and write data to flash memory?
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.
 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)
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.
Maybe someone can tweak the firmware from the 16u2 to let the SRam used by the SAM.