Difference between revisions of "STM32 W25Qxx LittleFS"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
[[Category:C]][[Category:STM32 Development]][[Category:STM32 HAL]][[Category:STM32CubeMX]][[Category:STM32CubeIde]][[Category:Embedded]][[Category:STM32]]{{metadesc|Running LittleFS on W25Qxx Serial Flash on STM32}} | [[Category:C]][[Category:STM32 Development]][[Category:STM32 HAL]][[Category:STM32CubeMX]][[Category:STM32CubeIde]][[Category:Embedded]][[Category:STM32]]{{metadesc|Running LittleFS on W25Qxx Serial Flash on STM32}} | ||
While working on [[STM32 W25Qxx]] I briefly experimented with getting FATFS up and running on the flash device. I quickly realised that this is a really poor idea. The problem is that [[W25Qxx]] flash devices has got a limited number of writes. FATFS works on some fixed tables and these tables will be updated on each file write. A typical [[W25Qxx]] got a number of guaranteed writes around 100000. If you imagine a system that update a file every second, this could mean that sector will wear out in < 2 days. | While working on [[STM32 W25Qxx]] I briefly experimented with getting FATFS up and running on the flash device. I quickly realised that this is a really poor idea. The problem is that [[W25Qxx]] flash devices has got a limited number of writes. FATFS works on some fixed tables and these tables will be updated on each file write. A typical [[W25Qxx]] got a number of guaranteed writes around 100000. If you imagine a system that update a file every second, this could mean that sector will wear out in < 2 days. | ||
+ | |||
+ | A much better approach is to use a file system with built-in wear levelling and fortunately [https://github.com/littlefs-project/littlefs LittleFS] is just that. | ||
Revision as of 02:21, 25 March 2022
While working on STM32 W25Qxx I briefly experimented with getting FATFS up and running on the flash device. I quickly realised that this is a really poor idea. The problem is that W25Qxx flash devices has got a limited number of writes. FATFS works on some fixed tables and these tables will be updated on each file write. A typical W25Qxx got a number of guaranteed writes around 100000. If you imagine a system that update a file every second, this could mean that sector will wear out in < 2 days.
A much better approach is to use a file system with built-in wear levelling and fortunately LittleFS is just that.