cancel
Showing results for 
Search instead for 
Did you mean: 

NAND Flash with FATFS in STM32Cube4

Paul J Kim
Associate II
Posted on January 13, 2017 at 11:21

Is there any good starting point to implement a FATFS on NANDFlash ?

The CubeMX has generated FATFS related files but there is no option for NAND flash.

#fatfs
5 REPLIES 5
Imen.D
ST Employee
Posted on January 13, 2017 at 12:55

Hello

H_Kim.Paul_Jay

‌,

NAND Flash is not supported by CubeMx as mentioned in the

http://www.st.com/content/ccc/resource/technical/document/user_manual/10/c5/1a/43/3a/70/43/7d/DM001047pdf/files/DM001047pdf/jcr:content/translations/en.DM001047pdf

FatFs section:

NOR and NAND Flash memory are not supported. In this case, the user shall select the FatFs user-defined mode and update the user_diskio.c driver file generated to implement the interface between the middleware and the selected peripheral.

Regards

ImenD

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
stm322399
Senior
Posted on January 13, 2017 at 15:20

FatFs does not run efficiently on NAND without flash translation layer.

Because of the large size of erase sector (128KB is very common these days), a naive port of FatFs on NAND will wear out the first sector (frequent FAT updates) and run dramatically slow (when individual 512 bytes sector are updated by copying a whole 128KB erase block).

Posted on January 14, 2017 at 04:06

thanks for the comment.

Posted on January 14, 2017 at 04:10

thanks for the comment.

I am working on converting some spl NAND example to HAL NAND example first. It works fine now.

If I finish NAND FATFS, I will look over the performance issue. But I have no choice to use others but NAND Flash at this moment.

Posted on January 14, 2017 at 05:53

Well the real issue here is just how unmanageable 128KB of data will become when you need to insert a KB in the middle...

Maybe FAT isn't the best choice here?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..