Recently, as a result of the project needs, do a data acquisition of single-chip computer platform. Need to transplant FatFs. Now put the final results on the surface.
On the STM32 single-chip microcomputer, successfully transplanted FatFs 0.12b, using the Nand Flash chip for k9f2g08.
Features: System with FatFs to achieve the erase and write equalization, bad block management, hardware ECC, software ECC error correction
File composition:
FatFs Directory
+----FFCONF.H files configured for FatFs
+----Ff.h
+----FF.C is a FatFs implementation file, and the erase-write equalization is implemented in the F_getfree function.
+----CCSBCS.C file name support in English
+----CC936.C file name support Chinese
+----DISKIO.C is an interface function between FatFs and a custom drive layer
+----NANDDISK.C for its own implementation of the Nandflash matching function, bad block management is implemented here. BSP Directory
+----Fsmc_nand.h definition of various parameters of K9F2G08
+----FSMC_NAND.C Implements hardware-level read-write drivers, STM32 's hardware ECC is used here. ECC Automatic error correction is also implemented.
Note: In order to obtain a 64*2k erase buffer, the system also uses a SRAM chip to support malloc memory allocation functions. This file is provided by your own system.
Reference:
FatFs system http://elm-chan.org/fsw/ff/00index_e.html
ECC algorithm Detailed description http://www.360doc.com/content/11/0523/17/496343_118837985.shtml
Finally, if you want to download the program's friends please click here: source program Download
STM32 under the fatfs of the transplant, to achieve the write-off balance, bad block management, hardware ECC,ECC error correction