This page describes how to determine the NAND timing parameters for use in the NAND driver. This is independent of any OS that may be used.
Analyzing NAND Datasheets
We use a spreadsheet to capture and analyze NAND features. That spreadsheet is [attached to this wiki page|Adding support for a new NAND with i.MX28– Nand Analysis^nand_analysis_template.xls].
We analyze a NAND as described below.
- We must have the NAND datasheet to do the analysis.
- Copy the *analysis spreadsheet* to a new filename with the exact part number(s) of the NAND(s) being analyzed.
- Fill in sheet 1 ("Cover Page") of the analysis spreadsheet.
- Work on sheet 3 next:
- Fundamental Features.
- Other tables.
- If the NAND is one of a family listed together in a data sheet, then analyze the whole family with one spreadsheet. You can use the "Similar to" rows for the additional members of the family. Add more rows if needed.
- Most NANDs have an asyncrhronous interface, so there is not a simple clock frequency involved. Instead, there are various setup times, hold times, and output delays that imply limits on the I/O rate to/from the NAND. The spreadsheet compares the NAND's timing specifications to see if sums of the setup, hold, and output times are shorter than the minimim read-cycle or write-cycle times. The spreadsheet is specifically intended for use with the Nand controller in STMP378x/i.MX233/i.mx28 chips, so the spreadsheet performs the timing calculations with the goal of deriving the timing parameters *TSU*, *TDS*, and *TDH* for those CPUs. If the TDS and/or TDH quantities {color:#ff0000}turn red{color} after all the timings have been computed, then the computed TDS and/or TDH are too short for the specified cycle-time of the NAND. In that case:
- You will have to increase one or both of them in the software.
- Write a note somewhere in the analysis spreadsheet about the values that you choose, but don't mess up the automatic computations.
- Record how the flash denotes factory-marked bad-blocks. (Some use the first page of a block, some use the last page,, etc.) Compare it to this [current superset of bad-block marking methods [http://wiki.freescale.net/display/PSGSW/Storage+Media%2C+Flash+Bad+Block+Marks] used to detect any flash factory bad block.
Example Analysis
Examples of NAND datasheets and analyses can be found on the [Hynix NAND Page | http://wiki.freescale.net/display/PSGSW/Hynix+NAND+Flash+Documents].