LittleFS on large QSPI NOR

I am having issues using a 2Gb NOR flash part for LittleFS storage on an nRF52840 based project (using the nRF Connect SDK). I am not sure yet if the issue is in the LittleFS module itself, the Zephyr fs (filesystem) module, or the QSPI/NOR driver. The symptom that I am seeing is that when I configure the size of the partition to larger than 16MB, after some amount of time (typically 15-20 minutes), the device begins reporting write errors (I'm writing to the device once per millisecond in my test app, in my final app, the writes will be in the range of every 40ms to every 4ms.

I have opened a ticket in the Zephyr project (https://github.com/zephyrproject-rtos/zephyr/issues/40453) which includes a piece of sample code and description for re-creating the problem, but I thought it might worth posting something here as well to see if anyone else has run into any similar issues.

Thanks!

  • I have reported it internally also in case someone can have a look/suggestions. Will let you know.

    Kenneth

  • Thanks Kenneth,

    I have updated the ticket over in Zephyr with some new information this morning. Should I also be updating here, or is this ticket referencing that issue sufficient?

    Thanks!!!

  • I have added a note in the internal jira that they should monitor the github issue for any new findings you may have.

    Kenneth

  • Kenneth,

    Has there been any progress on this internally? I have posted fairly explicit steps for recreating the issue in linked GitHub issue. I see that there is some activity toward getting Zephyr updated to use the latest version of LittleFS, but I think the issue still exists even in that latest version.

    It's not clear to me whether the issue is a general issue with LittleFS or if the issue is in the QSPI NOR driver. I have tried recreating the issue with both littlefs-python and/or a custom testcase directly in the LittleFS project itself and have not been able to recreate the issue. While it's possible, that I have just not tuned the testcase correctly, it seems like this might be pointing more toward the QSPI NOR driver. Is there any testing we can do to ensure that the QSPI driver is working as expected especially with large capacity parts?

    This issue is quickly becoming a blocking issue (and greatly increasing project risk) for us. Does Nordic have any direct contacts at Zephyr and/or LittleFS to be able to drive a little more progress/attention on this issue?

    Thanks!

  • I just discovered that I was not setting the address-size-32 field in the QSPI DTS entry. Obviously, that would map pretty well to the fact that I don't see symptoms with flash area sizes below 16MB. I'm rebuilding and re-running my code now, but I don't see anywhere in the code that this field is actually/obviously consumed.

    Is this field actually used by the driver to determine addressing mode (24-bit vs. 32-bit)? If not determined by this field, how does the driver decide which addressing mode to use, how can I ensure that we are using 32-bit mode for this part?

Related