cmaglie / FlashStorage

A convenient way to store data into Flash memory on the ATSAMD21 and ATSAMD51 processor family
203 stars 69 forks source link

writting 200kB data to the flash #24

Open CSC-Olivier opened 6 years ago

CSC-Olivier commented 6 years ago

The way I understand the library, is that the storage is limited to the size of the RAM since one have to first declare the variable in RAM. Is that correct?

I am trying to write a lot of data to the flash (like up to 200kB).

The way I would like it to work is to fill a 256B buffer in RAM and then write it to flash. Then increment the address, refill the buffer and write it again to the new address. Is there a way to do that? I looked at the write(flash_address, data, flash_size) function, but between the different class definition and the pointers, I am lost! Any help (or pointer towards the right direction) would be much welcome. I think that could also be a useful feature for other data logger projects that will want to store a lot of data.