STM32 under the fatfs of the transplant, to achieve the write-off balance, bad block management, hardware ECC,ECC error correction

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.