cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407VG: Need help to use Flash file system (fatfs) on SPI based NAND Flash

aahme.4
Associate II

Hello, STM32F407vg. I am looking for some help in using a flash file system (faftfs) on SPI based NAND Flash. Are there any examples or demonstrations that I can look for to start with?

1 REPLY 1
Jack Peacock_2
Senior III

The problem is FAT is not a very good solution for NAND memory unless you have the underlying wear-leveling block management layer in place. Yes, USB sticks do use FAT, but there's a lot you don't see going on between the USB MSC storage class and actually reading/writing sectors.

You might consider either an SD card or an eMMC module instead of raw SPI NAND. These devices have the block management layer embedded in the hardware.

And if you do come up with a reliable raw NAND version for FATFS that works across unexpected resets and power loss (quite a challenge, even the Linux block mode NAND driver is a "hobby only" toy), then you have a viable commercial product to sell.

So don't expect much in the way of free raw NAND support. I know of one company that spent at least $4 million USD on trying to get raw block mode NAND to work for several commercial products, never found out if they succeeded but it wasn't working reliably last time I saw it.

Jack Peacock