Arm Mbed OS support forum

LittleFS file integrity check?

Hi, I’m having an issue where a reset occurs in the middle of writing to a file on the flash IC (Quad SPI NOR Flash). After the reset the file becomes corrupted and LittleFS gets stuck at an assert only when it attempts to write to it again, it is able to open it without issue. So my question is how can I detect corrupted files before they cause an assert? The file system itself is not corrupted because it gets mounted successfully and other files that are not corrupted are readable/writable.

Doug Burrell