1 month, 1 week ago.
LittleFS assert with "Assertion failed: block < lfs->cfg->block_count"
We have several instance of LittleFS assertion on SD card, using UBLOX_C030_U201 device, and happened with different SD cards from different vendors.
After we clone the SD card to new card, the new SD will have the same issue. We narrow down to a particular file, when we try to read the file, it got the following error.
My guess is, the file uses several SD blocks to store the data, one of the block value is corrupted and point to a location beyond the capacity of the SD card.
One instance seems relate to we power cycle the device and run into this issue, another instance happened during normal operation.
Question is: 1. What information we should collect to further help investigation, is there any log or debug we could turn on? 2. We changed the assert to an error message and return, which end up an infinite loop of the error message. Is there a way to return an error when the read failed or run into a bad block?
The error message is
++ MbedOS Error Info ++ Error Status: 0x80FF0144 Code: 324 Module: 255 Error Message: Assertion failed: block < lfs->cfg->block_count Location: 0x0 File: .\mbed-os\features\storage\filesystem\littlefs\littlefs\lfs.c+18 Error Value: 0x0 Current Thread: main Id: 0x2000D430 Entry: 0x8023E09 StackSize: 0x1000 StackMem: 0x2000D490 SP: 0x2000DF18 For more info, visit: https://armmbed.github.io/mbedos-error/?error=0x80FF0144
1 month ago.
LittleFS has 4 levels of debug logging. By default, all logging is enabled except for enable_debug. Setting enable_debug to true makes the log output very verbose, and the output is useful for bug reports.
Please refer here.
You need to log in to post a question