Skip to content

littlefs Integration - ECC Fails with Blank Buffer if Initial Values are not Zero #1

@dhughes-gh

Description

@dhughes-gh

I'm trying to implement the ECC correction demonstrated in this project for a flash based block device used by LittleFS.

The major difference between the samples in this repository and a flash device in hardware is the default value of the bytes (0x00 in the examples in RAM, and 0xFF in flash hardware). To emulate this, I changed the default state of the RAM buffer to contain 0xFF in each location and implemented an erase handler for ramrsbd that resets buffer positions to 0xFF.

When using the ramrsbd with this modified buffer in littlefs, lfs_open_file is returning error LFS_ERR_CORRUPT because the block device read function is failing when it calculates non-zero syndromes on the "blank" areas.

Is there a recommended way to deal with this so that littlefs can use the ECC correction from this project in custom block devices?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions