Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor10300261030026 Generic Controller Layer Implementation Anchor10278601027860The generic controller layer driver is an implementation of the controller layer that is compatible with most parallel NAND devices and most simple memory controllers. It has the following features: Anchor10283951028395

  • Supports multiple sector per page

...

...

  • Packs out-of-sector (OOS) metadata around reserved spare area zones

...

...

  • Extensible through extensions that provides multiple hooks to allow for different ECC protection schemes (an extension for software ECC is provided)

...

  • Supports reading ONFI parameter pages through a its IO_Ctrl() function

...

  • Supports both 8-bit and 16-bit bus devices

...

The generic controller driver imposes a specific page layout: the sectors are stored sequentially in the main page area and OOS metadata zones are stored sequentially in the spare area, packed in the free spare zones specified by the .FreeSpareMap field of the associated FS_PART_DATA data structure. An example layout is shown below for a device with 2048 octets pages, using 512 bytes sectors.anchor

Panel

...

borderWidth

...

0

...

titleFigure - Example generic controller driver page layout

...

Image Added


10298091029809To determine if the generic controller driver is compatible with your hardware, you can study its BSP interface, described in section 13-8-1 “BSP BSP Development Guide - Generic Controller” on page 190. Anchor10296741029674Controller.

Generic Controller Extension Layer

...

1034828The generic controller extension layer extends the functionality of the generic controller, mostly with regards to ECC. It allows for the reuse of the generic controller code, enabling easy customizations of the controller layer. The NAND driver ships with two generic controller extensions:anchor

Panel

...

Extension API Files Description
HTML Table
summary
classPlain_Table
Table Row (tr)
Table Cell (td)
Anchor
10477051047705
Table Cell (td)
Anchor
10477071047707
Table Cell (td)
Anchor
10477091047709
Table Row (tr)
Table Cell (td)
Anchor
10477111047711
borderWidth

...

1047713
0
titleTable - Generic controller layer extensions provided


Extension API

Files

Description

FS_NAND_CtrlrGen_SoftECC

Table Cell (td)
Anchor
1047713

fs_dev_nand_ctrlr_gen_soft_ecc.* in /Micrium/Software/uC-FS/Dev/NAND/Ctrlr

td

Anchor10477161047716

Supports software ECC calculation and correction through µC/CRC ECC modules.

Table Row (tr) Table Cell (td) Anchor10477181047718

FS_NAND_CtrlrGen_MicronECC

Table Cell (td) Anchor10477201047720

fs_dev_nand_ctrlr_gen_micron_ecc.* in /Micrium/Software/uC-FS/Dev/NAND/Ctrlr

Table Cell (td) Anchor10477231047723

Supports on-chip ECC hardware for some Micron parts (ex: MT29F01G08ABADA).

...



1038367The software ECC generic controller extension (FS_NAND_CtrlrGen_SoftECC) uses µC/CRC’s ECC modules for the ECC codewords calculation and data correction. The extension is configurable through a FS_NAND_CTRLR_GEN_SOFT_ECC_CFG type structure. It should be initialized to the value FS_NAND_CtrlrGen_SoftEcc_DfltCfg before its fields are overridden to the appropriate values for your application.anchor


Code Block

...

typedef struct
HTML Table
summary
classCode_Listing
Table Row (tr)
Table Cell (td)
rowspan6
Anchor
10391791039179
language

...

const
 {
    const ECC_CALC  *ECC_ModulePtr;                     (1)
}

} FS_NAND_CFG;
cpp
titleListing - NAND translation layer configuration structure
linenumberstrue
typedef  struct  fs_nand_cfg
{
Anchor
10391801039180
Anchor
10391911039191
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)

...


Panel

(1) Pointer to an ECC_CALC

...

 API structure that will be used to provide software ECC calculation and correction. Refer

...

to ECC Module Development

...

Guide and µC/CRC’s user manual for more information on ECC modules.

...


The Micron ECC generic controller extension (FS_NAND_CtrlrGen_MicronECC) allows the use of internal on-chip hardware ECC engines for some Micron NAND flash parts. The extension has been designed as an example for the Micron MT29F1G08ABADA, but should function properly with other similar Micron devices with internal ECC hardware modules. This module doesn’t have any configuration options, you should use DEF_NULL as the generic controller extension configuration pointer (.CtrlrExtCfg field of the FS_NAND_CTRLR_GEN_CFG structure).

Note that the spare layout ('.FreeSpareMap' field of the associated FS_PART_DATA) needs to be set such that the spare zones where the Micron NAND part will store its ECC data is not being defined as free.