-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Original question in mbed forum
https://os.mbed.com/questions/87274/LittleFS-assert-with-Assertion-failed-bl/
We have several instance of file corruption when power cycle thedevice and during normal operation. After i clone the SD card to new SD card, the new SD card will have the same assert when trying to read the corrupted file or when calling statvfs() or when trying to create new files.
Reformat the SD card, or remove all the corrupted file can fix the issue.
the error message
++ 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
$ cat temp1909280234.tmp h
lfs info:413: file_open(0, "00170d3314aa/00170d5acf2a/temp1909280234.tmp", 0x0)
lfs info:415: file_open -> 0
lfs info:441: file_read(20008520, 20008778, 512)
C:\software\git\conmet_test_automation\mbed-os\features\storage\filesystem\littlefs\littlefs\lfs.c:1144 test -- assertion failed
++ MbedOS Fault Handler ++
FaultType: HardFault
Context:
R0 : 00000018
R1 : 00020026
R2 : 20002AF0
R3 : 00000000
R4 : 20008544
R5 : 20008548
R6 : 00000001
R7 : 00000000
R8 : 200033A8
R9 : 00000000
R10 : 0800282C
R11 : 00000001
R12 : 08008047
SP : 20002AF8
LR : 080015B5
PC : 08007B3C
xPSR : 01000000
PSP : 20002A90
MSP : 20005E00
CPUID: 410FC241
HFSR : 80000000
MMFSR: 00000000
BFSR : 00000000
UFSR : 00000000
DFSR : 0000000A
AFSR : 00000000
Mode : Thread
Priv : Privileged
Stack: PSP
++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0x0
Error Value: 0x8007B3C
Current Thread: main Id: 0x20001C58 Entry: 0x800C671 StackSize: 0x1000 StackMem: 0x20001CB8 SP: 0x20005DA0
And if turn on LFS info and disable assert, see infinity message of this