LittleFS Flash File System

From Embedded Workshop
Revision as of 01:12, 4 October 2020 by JMerkle (talk | contribs)
Jump to navigation Jump to search

LittleFS Flash File System

I recently learned about a compact embedded Flash File System known as SpiFFS.
While researching SpiFFS, I soon learned of another compact embedded Flash File System, LittleFS.
LittleFS is even more compact and has additional security in that it creates and maintains a CRC for each file, and verifies the CRC each time the file is read.

  • Compact
  • Power-loss resilience
  • Dynamic wear leveling
  • Bounded RAM/ROM
  • Maintains revision count and CRC (security features)

Let's put this file system onto a STM32 board (I'm using a NUCLEO-F103RB), and check it out.

Cloned littleFS to my local machine.
Using Winbond W25Q128FVSG SPI Flash module from Ebay: https://www.ebay.com/itm/264290947181
If the link doesn't work, just search Ebay for "W25Q128 Module".  I bought two for $8.26 (free shipping).
Downloaded the PDF for the W25Q128FVSG : https://www.winbond.com/resource-files/w25q128fv%20rev.m%2005132016%20kms.pdf
The W25Q128FVSG uses 1.65V to 1.95V for operation.
The NUCLEO-F103RB powers the STM32F103RB with 3.3V.  (The chip is capable of running with 2.0V to 3.6V.)
Seems we have our first problem....
Need some more components to build an interface circuit
3.3V to 1.8V linear power supply, Microchip MIC5504-1.8YM5-TR, or Mouser 998-MIC5504-1.8YM5TR
Although this is a cheap $0.11 part, it has an internal pull-down resistor on the enable pin, not desired.
Quad level shifter, 3.3V to 1.8V, SN74LV4T125



Reference Information:

https://uimeter.com/2018-04-12-Try-LittleFS-on-STM32-and-SPI-Flash/
https://github.com/ARMmbed/littlefs
https://github.com/ARMmbed/littlefs/blob/master/README.md