I'd like to share with you some thoughts about a project to see if there are better solutions than mine...
I'm designing a board based upon CC3220SF, that requires an external flash (16 Mbit) where it stores system's and user's files.
My application MUST have a persistent circular buffer of 512/1024 kbytes. This is because the board acquires some sensors periodically and send them to the cloud. But if the connection is not available it MUST save the data for later uploading.
- use the internal RAM: reducing a bit the requirements about the buffer size, the space is enough but it seems it isn't reliable across resets (please note my system is battery powered: if the battery dies it's acceptable to loose the last records - if any)
- use the external flash: there is plenty of space, but it seems there it's not possible to "overwrite" a file changing only the bytes involved: any write operation leads to a complete rewrite of the whole file. This limits the expected life of about 100,000 records. No way.
- add an external S/F/D/NV-RAM: after some searches I found DRAMs are very cheap but require a parallel bus. The other types are quite expensive for that capacity.
- ok, the last idea that comes to my mind is to add a second flash memory. Now I can write to it directly (without any file-system) but I have to select one that not requires a full page write.
Some other information:
- the expected life of the battery should allow to acquire more than 130,000 records
- of course after replacing the battery the board must be still functional...
- due to the expected environment, it is very likely that the board might acquire hundreds of records every day WITHOUT an available connection. Then it will upload them at once during the night.
Any suggestions would be appreciated.