Getting "Corrupted dir pair at {0x0, 0x1} ..." error if I do nrfjprog --eraseall then flash the application

Hello my friends,

I have been working with the LittleFS, and I have realized if I do "nrfjprog --eraseall" and then flash a simple application that writes a few bytes into flash memory via fs_write and related FS APIs, I get the following error although the the application proceeds anyways and actually writes on the flash. Here is the complete error:

littlefs:lfs_dir_fetchmatch: WEST_TOPDIR/modules/fs/littlefs/lfs.c:1234: Corrupted dir pair at {0x0, 0x1}

I was wondering what might be the possible root cause(s) and how I can fix it.

Thanks,
Omid

Parents Reply
  • Omid said:
    could you tell me about this a bit more?

    I do not have any external flash connected to my devkit

    At any rate, I tired "nrfjprog --family NRF52 --qspieraseall" and then flashed the application and the issue didn't occur.

    Since you do not use external flash,  I doubt this command will affect anything.

    If the error message is only after the first flash, I suggest that you ignore it that time, knowing that when littlefs flash has been initialized, the error will disappear. Does this solution work for you?

Children
Related