7 years, 6 months ago.  This question has been closed. Reason: Duplicate question

MX25R serial flash file directory

Hello,

I would like to use serial flash file directory method to create a file system for my mx25r(64Mb) serial Nor flash. I had interfaced using SPI communication between stm32l0 controller and Mx25R flash. I had created a file with size 1024 bytes but the problem is that i need to store large data.

Structure to store data variables

struct Data_Readings
{
    int16_t ADXL_Readings[3];
    float   Lux_Reading;    
    float   Temprature_Reading;   
    float   Humidity_Reading;
    float   Pressure_Reading;
    float   Dew_Point;
};

Now I would like to create a file on serial flash file system of no size. After closing the file the size of the file can be taken in to consideration. Is there any way that I could get some help so that I could move forward or any suggestion would be really helpful. Thank you.