Adding Support For a New NAND with i.MX28 on Win CE

Document created by jesseg Employee on Aug 3, 2012Last modified by Jodi Paul on Apr 19, 2013
Version 4Show Document
  • View in full screen mode

Structures to be modified

The main table that needs to be modified is in C:\WINCE600\PLATFORM\COMMON\SRC\SOC\COMMON_FSL_V2_PDK1_9\NAND\INC\NANDTYPES.h. Add the Nand specific information to the following structure.


typedef struct _NandChipInfo


FlashInfo fi; //@<<info> FlashInfo structure


BYTE NumBlockCycles; //@<<info> flash erase address cycle

BYTE ChipAddrCycleNum; //@<<info> flash access address cycle

BYTE DataWidth; //@<<info> 8/16 bits data width

BYTE BBMarkNum; //@<<info> MAX_MARK_NUM = 4

BYTE BBMarkPage[MAX_MARK_NUM];//@<<info> MAX_MARK_NUM = 4

BYTE StatusBusyBit; //@<<info> interleave mode support

BYTE StatusErrorBit; //@<<info> interleave mode support

WORD SpareDataLength; //@<<info> spare area size

BYTE CmdReadStatus; //@<<command> read status

BYTE CmdRead1; //@<<command> read first 256 bytes data

BYTE CmdRead2; //@<<command> read last 256 bytes data

BYTE CmdReadId; //@<<command> read device ID

BYTE CmdReset; //@<<command> reset nand flash

BYTE CmdWrite1; //@<<command> sequence data input

BYTE CmdWrite2; //@<<command> page program

BYTE CmdErase1; //@<<command> block erase

BYTE CmdErase2; //@<<command> block erase

NANDTiming timings; //@<<info> NAND timing parameters

}NandChipInfo, *pNandChipInfo;

All information from NANDCode to CmdErase2, can be obtained from the Nand Datasheet. The structure FlashInfo, is filled in with data obtained from the Nand Analysis sheet. Please check this link to see how to create this spreadsheet from Nand Datasheets.


typedef struct _FlashInfo {

FLASH_TYPE flashType;

DWORD dwNumBlocks;

DWORD dwBytesPerBlock;

WORD wSectorsPerBlock;

WORD wDataBytesPerSector;

}FlashInfo, *PFlashInfo;


In the similar way the Nand timings calculated from the spreadsheet are add into this structure.

typedef struct _NANDTiming


BYTE DataSetup;

BYTE DataHold;

BYTE AddressSetup;

BYTE DataSample;

}NANDTiming, *PNANDTiming;

Remember to do a clean sysgen and build.