Giter VIP home page Giter VIP logo

Comments (3)

geky avatar geky commented on June 2, 2024

Hi @alex31, thanks for creating an issue. This shouldn't happen, as far as I'm aware there's no known power-loss issues, but of course there's always the possibility of an unknown bug.

Is it a known problem with littlefs, or is it the internal moves done by the sdcard firmware that are responsible of the corruption ?

I would be a bit suspicious of the SD card. They are quite a bit more complex than raw NOR/NAND flash, so probably take a bit more encouragement to actual persist writes to disk. littlefs's bd sync function needs to send whatever is equivalent to sync to the SD card and wait for it to complete, or else the filesystem state can become corrupted.

I would also not put it past cheaper SD cards to ignore sync commands/ordering given 199% of them end up formatted with FAT anyways. It may be worth trying SD cards from different manufacturers to see if the problem is consistent.

from littlefs.

alex31 avatar alex31 commented on June 2, 2024

Thanks for the answer, I am refining my testbench to have more statistics with different brand of sdcard. I also ordered "integral security sd card", a brand that have a line of micro sd card where the firmware is written to be failsafe on power loss, at the depend of performance. I have implemented __lfs_sd_sync to send sync CMD to the sdcard, so problem should no be on that side, more on the internal SD card firmware that is not guaranteed to be failsafe IMHO.

from littlefs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.