File Delete in littleFS results in -22 error

So I have a device on a custom PCB with an nrf52832 and a mx25r1635f, with which I've had quite some trouble already(  File write gives -5 after file size reaches cache size  ). In most of the devices it's working correctly and was working up until a couple hours ago, but now any operation with the Flash takes over 14 SECONDS!, that's ludicrous to me, I tried to delete the files and clear the flash, giving the -22 error, I'm very lost at this point, since I can't delete the files individually, can't clear the flash area. Does anyone know what could be the case happening here? Config information can be found on the ticket I linked.

  • The page you linked is a dead URL.

    Here's some background info I've experienced:

    When using LittleFS, operations begin to take a long while as the file sizes get bigger. 14 seconds can sometimes happen depending on the flash youre using and how big the littlefs file is.

    Check this out:

    (x axis - write size, y axis - ratio between average fs write speed vs average raw write speed)

    Try formatting and re-mounting the file system. It's odd that it's not letting you delete, but it could be due to a timeout.

    I've run into that and had to change the timeout for the flash interactions.

  • Hi, fixed the link, due to the error mentioned on the linked ticket, the file is only 127 bytes long, so 14 seconds doesn't make sense

  • 127 bytes definitely doesnt make sense for 14 seconds.

    Does this behavior occur between every single "fs reset" like format/unmount/mount?

  • Yes it happens constantly now on a specific hardware, on every reset. On the other PCBs it doesn't happen, it's only on that one specific board.

  • If it only happens on one specific board you have and not others, my instinct would be to assume something is up with that board.

    could you clarify?

1 2 3 4