Skip to content

read/prog sizes for SPI NAND flash with internal HW-buffer #277

@toesus

Description

@toesus

Hi,
I am trying to use littlefs on a SPI nand flash device. This device has an internal buffer of 1 page (2048 bytes), while the erasable block size is 64 pages.
Reading/Writing from the flash memory to the hw-buffer is done in full 2048 byte pages, so my first guess for read_size and prog_size was 2048.

However, SPI-access to the hw-buffer can be done one byte at a time. This means that I could set the read_size to 1. In the same way I could set the program size to 1 as well. If lfs tried to write less than a full page, I could first reset the hw-buffer, write only some part, and then program the buffer content to flash.

So I guess technically I could choose any value from 1 to 2048 for the read_size and prog_size, is there any guidelines on what would be an useful value?

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