SPIFFS read after write is not correct
saperlot opened this issue · comments
Hi,
If i take the example from the wiki (create file / write "hello world" / close / open / read) it works.
if i remove the steps close and open, basically create / write / read, data which i read is wrong.
Is there an issue with my cache or is this not what i should do?
My cache buffers are these:
static u8_t spiffs_work_buf[QSPI_PAGE_SIZE*2]; static u8_t spiffs_fds[sizeof(spiffs_fd) * SPIFFS_MAX_OPEN_FILES]; static u8_t spiffs_cache_buf[(QSPI_PAGE_SIZE+32)*4];
Did you flush before read?
Den fre 10 jan. 2020 09:05saperlot <notifications@github.com> skrev:
… Hi,
If i take the example from the wiki (create file / write "hello world" /
close / open / read) it works.
if i remove the steps close and open, basically create / write / read,
data which i read is wrong.
Is there an issue with my cache or is this not what i should do?
My cache buffers are these:
static u8_t spiffs_work_buf[QSPI_PAGE_SIZE*2]; static u8_t
spiffs_fds[sizeof(spiffs_fd) * SPIFFS_MAX_OPEN_FILES]; static u8_t
spiffs_cache_buf[(QSPI_PAGE_SIZE+32)*4];
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#255?email_source=notifications&email_token=ABG42V5IQ7F27UJ6WELFPF3Q5AT4DA5CNFSM4KFD6GFKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IFIWNSA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABG42V7ZRPYNG2PNRB4GFQLQ5AT4DANCNFSM4KFD6GFA>
.
Wouldn't you need to seek back to the beginning of the data before the read?