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

Showing results for 
Search instead for 
Did you mean: 

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

No ratings

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

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.

Labels (1)

Hi, could you please provide a link to the NAND analysis spreadsheet mentioned in the post. Thanks, Mark

Version history
Revision #:
1 of 1
Last update:
‎08-03-2012 01:24 PM
Updated by: