none
iMX28 1GBit or 2GBit NAND flash support winCE 6.0 RRS feed

  • Question

  • Hi!

    I am using iMX28evk + own developed HW, that based on iMX28.

    Few days ago i found some issue with NAND chips, that smaller than 4G (512MByte).

    As usually for add NAND to WinCE 6.0 i made changes in nandtypes.h.

    Rebuild project and checked, that eboot can see this chip,

    BUT ! Windows CE do not want to work with this chip..

    "ERROR: C:\WINCE600\PLATFORM\COMMON\SRC\SOC\MX28_FSL_V2_PDK1_9\MEDIA\NAND\CORE\.\cspnand.c line 505: 11877 PID:400002 TID:ea0002 FMD_Deinit: FMD Driver is unloading (c095d8a0)"

    i made some researching and found 

    In file c:\WINCE600\PLATFORM\iMX28-EVK-PDK1_9\SRC\INC\image_cfg.h i found line with:
    #define IMAGE_BOOT_NANDDEV_RESERVED_SIZE    (DWORD)((DWORD)(312 * 1024 * 1024))
    
    i was happy :) i tried to change it to less value.... but it did not help me. Win CE kernel still do not want to work with small chips.

    My collegue have tried to add 4G NAND - any issues, everething is ok. But when i am trying to add 1G or 2G - it does not work....

    Can somebody help me please?

    Record in nandtypes for new chips:

    //MT29F1G08ABADAW 9580F12C
    {
    {NAND, 1024, 2048 * 64, 64, 2048}, //FlashInfo fi;
    {0x2C, 0xF1, 0x80, 0x95}, //BYTE NANDCode[NANDID_LENGTH]
    3, //BYTE NumBlockCycles
    5, //BYTE ChipAddrCycleNum
    8, //BYTE DataWidth
    1, //BYTE BBMarkNum
    {0}, //BYTE BBMarkPage
    6, //BYTE StatusBusyBit
    0, //BYTE StatusErrorBit
    64, //WORD SpareDataLength
    0x70, //BYTE CmdReadStatus
    0x00, //BYTE CmdRead1
    0x30, //BYTE CmdRead2
    0x90, //BYTE CmdReadId
    0xff, //BYTE CmdReset
    0x80, //BYTE CmdWrite1
    0x10, //BYTE CmdWrite2
    0x60, //BYTE CmdErase1
    0xD0, //BYTE CmdErase2
    {50, 50, 50, 50} //NANDTiming timings
    },

    //MT29F2G08ABA
    {
    {NAND, 2048, 2048 * 64, 64, 2048}, //FlashInfo fi;
    {0x2C, 0xDA, 0x90, 0x95}, //BYTE NANDCode[NANDID_LENGTH]
    3, //BYTE NumBlockCycles
    5, //BYTE ChipAddrCycleNum
    8, //BYTE DataWidth
    1, //BYTE BBMarkNum
    {0}, //BYTE BBMarkPage
    6, //BYTE StatusBusyBit
    0, //BYTE StatusErrorBit
    64, //WORD SpareDataLength
    0x70, //BYTE CmdReadStatus
    0x00, //BYTE CmdRead1
    0x30, //BYTE CmdRead2
    0x90, //BYTE CmdReadId
    0xff, //BYTE CmdReset
    0x80, //BYTE CmdWrite1
    0x10, //BYTE CmdWrite2
    0x60, //BYTE CmdErase1
    0xD0, //BYTE CmdErase2
    {50, 50, 50, 50} //NANDTiming timings
    },


    Sergii Makovetskiy

    Thursday, March 22, 2012 4:50 PM

Answers

  • I found an answer :)

    File image_cfg.h include system defines for RAM and ROM memory. Variable
    IMAGE_BOOT_NANDDEV_RESERVED_SIZE
    should be changed according to the NAND chip type and size. NAND mapping:

    Block 000 NCB - Boot ControlBlock (4 blocks)

    Block003 BBT - Bad Block Table (4 Blocks)

    Block007 DBBT - Bad block table used by ROM (2 Blocks)

    Block009 BOOT IMAGE - Eboot image (512 Blocks)

    Block 521 BOOTCFG - Boot configuration (1 Blocks)

    Block522 UUID - Universally Unique Identifier (1 Blocks)

    Block523 NKIMAGE - OS - WinCE Kernel (32 MB)

    BlockXXX Flash File System

    So, variable IMAGE_BOOT_NANDDEV_RESERVED_SIZE should be set to the value:

    521 * block size (in bytes) + 32 * 1024 *1024
    Example 1:

    1G NAND, 2048 * 64 block size

    IMAGE_BOOT_NANDDEV_RESERVED_SIZE = 101842944 ~=98MB

    So, in fileimage_cfg.hit is needed to change:

    #define IMAGE_BOOT_NANDDEV_RESERVED_SIZE    (DWORD)((DWORD)(98
    * 1024 * 1024))

    It is necessary to rebuild eboot and NK. Also i recommend make low level format of the NAND from eboot (from new-builded eboot).

    I have tested it with 1G and 2G chips from Micron.


    Sergii Makovetskiy


    Monday, March 26, 2012 3:21 PM