I am implementing QSPI data logging in my firmware. My log size is 16B and I have 8 MB of storage, assuming I cycle through all my sectors to get even wear on the flash chip is there anything else I need to be concerned about?
My goal is a 10 year life expectancy, I have done a calculation to see how frequently I can write per hour and I am concerned I am misunderstanding because my calculations show I can write very frequently.
8 MB / 16 B = (524k logs per storage) * (100k erase cycles) = (524k * 100k) logs per flash chip life
(524k * 100k) / (10years * 365days * 24 hours) = 600k logs per hour
Edit: My sector size is 4 KB so I guess I am concerned if 256 writes before an erase will cause additional ware that I am not considering? ( 4 KB / 16 bytes = 256 writes)
Yes you can write very frequently, in case you consider one write per hour to be frequent.
Edit: My sector size is 4 KB so I guess I am concerned if 256 writes before an erase will cause additional ware that I am not considering? ( 4 KB / 16 bytes = 256 writes)
If you are willing to sacrifice the whole 8Mb, then this improves the situation and gives you twice the amount of write cycles, assuming you only erase one of the sectors once the other one is full.
1024*1024*4 / 16 = 262k sector writes before erase
262k*2 = 524k writes in total before both sectors have been erased
524k*100k = 52.4*10^9 hours.
This assuming that 16 times 0xFF (value of erased memory) cannot be valid data.