4 months ago.
SPIF Block Device using SST25VF
I have some questions when using a SST25VF Flash memory device, with the help of mbed's SPIFBlockDevice.
I understand on how it can read and write a data, based on the library, but right now, I wanted to make this SST25VF as a data logging device. The idea is that it will receive data from a sensor which will have 100 Hz sampling rate.
The question is that, I notice that in spif.program() we need to set the address. Now, when we wanted to use as a datalogger, which will accept data every 1/100 second, how will this address be like? How can we increment this address so we will not have overlapping data which can corrupt the data? Also, is it correct, as this has 4Kbyte sectors, that mean that 1 address can store 4Kbyte worth of data?
I am quite lost here and would love to have help. Oh, I am using an offline compiler, with STM32F4 discovery board, and here is the datasheet of SST25VF: https://www.elfa.se/Web/Downloads/_t/ds/SST25VF016Bx_eng_tds.pdf
Thank you very much!!
3 months, 3 weeks ago.
Hi Stanely, The program() API provides you with an interface to program a specific address. It is up to you how you want to store the data that is coming in every second. Do you want to keep updating the same address or have a data structure that gets written at that interval? If so, you would have to increment your write address accordingly. Hope this helps.
To post an answer, please log in.