Is there any recomended basic translation layer for NAND flash for FreeRTOS+FAT?
1. Bad sector list
2. Wear levering
3. Error detection
4. Redundant FAT
Purpose is firmware storage and logging of non-critical data.
It would give me headaches to write an efficient and fast and low-RAM FAT-driver for NAND.
You have to deal with an ERASE size of more than one block. Erasing means: writing "all ones". When you want to change one 512-block, you probably have to read/erase/write a much larger block of e.g. 2 or 4 KB.
For most projects where +FAT is needed, I would use an SD-card. SD-cards are optimised for FAT tables if you store the table after an offset of 4MB from the start. That part may be re-written much more often than any other part of the card.
As far as I know, a NAND flash chip has homogeneous memory, which can be re-written N times. You will have to write all logic that an SD-card will do for you. You will also have to deal with bad sectors: mark them as bad and repair a file system.
Depending on the data needs, you can also decide not to use a file system on NAND.
I hope that someone else has a more optimistic view on this :-)
You're right .
SD card or eMMC is simple and reliable option, but not every MCU can load/boot from eMMC.
Some commercial file systems provide that layer. Flash block handling is major IP.
Thank you very much for the reply.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.