Spiffs Block

How this block appears in a Simulink model?

What can be configured?

Configuration Parameter Selectable Option/Value Description
Mode Read /Write /Append Select pin for CS
Format if mount fail True--False If FAT partition cannot be mounted, and this parameter is true, create partition table and format the filesystem.
Base path /spiffs The block registers given FAT drive in VFS, at specified base path.
File path /spiffs/filename.txt
Maximum number of files 05 maximum number of files which can be open at the same time
Allocation unit size Multiples of 1024 If ‘format_if_mount_failed’ is set, and mount fails, format the card with given allocation unit size. Must be a power of 2, between sector size and 128 * sector size. For SD cards, sector size is always 512 bytes.

When to use this block?

SPIFFS lets you access the flash memory like you would do in a normal filesystem in your computer, but simpler and more limited. You can read, write, close, and delete files. At the time of writing this post, SPIFFS doesn't support directories, so everything is saved on a flat structure.

How does this block work?

SPIFFS is a file system intended for SPI NOR flash devices on embedded targets. It supports wear levelling, file system consistency checks, and more.

For more info : https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/spiffs.html


Spiffs demo

Previous : Wireless Communication Block (HIL)
Next : SD Card Read Block