Arduino Due with ADXL345 Accelerometer Flash Memory

Hey guys,
I am working on a project nowadays and wanted some help from you. I have an Arduino Due board connected with ADXL345 Accelerometer. The Accelerometer is currently displaying the values on the Arduino Screen when run, but I want to use the Flash memory of the Arduino Due board to save e.g. 1000 values and then send these values as a packet, then erase them and record new 1000 values and send them as a packet again and so on. So can anyone please guide me towards making this happen? and please explain in detail as I am armature in this field. Sharing a code for this purpose will be highly appreciable.
Regards,
Daniyal Khan

Is there a reason to avoid using RAM for this? You have to buffer whole pages anyway with
flash and you have to think about wear-rate...