none
i.MX25 NAND FLash driver for WinCE 6.0 RRS feed

  • Question

  • Hello,

    I'm using the freescale i.MX25 NAND flash driver for my platform.

    On my hardware the nand flash driver is working with my nand flash type, but WinCE creates a partition on the whole Flash, so the bootloader and the WinCE image is going to be overwritten on the first start.
    How could I change the area, where WinCE creates the NAND Flash partition? How could I configure the base address of the NAND flash partition in WinCE?

    Thanks,

    Andreas

    Thursday, August 11, 2011 5:51 AM

Answers

  • Hi Andreas,

    you can do that in the FMD_Init. I don't know the flash driver implementation on the i.MX25 BSP but you could have that information stored in the registry for exampel. Then you need to verify the address received from the system with the start address of your partition and return information that this address can be used or not. I think you can do that in the function FMD_GetBlockStatus.

    I hope that can help you.

    Best regards,

    Mike Engel

    • Marked as answer by Andreas_1981 Thursday, August 11, 2011 9:41 AM
    Thursday, August 11, 2011 9:13 AM

All replies

  • NAND flash driver reads this information from the MBR.

    MBR will be after 15 reserved blocks. Nand flash driver will read the MBR to get the information for partitioning.

     

    Refer code " ..\WINCE600\PUBLIC\COMMON\OAK\DRIVERS\ETHDBG\BOOTPART\bootpart.cpp" for implementation details.

     

    ---Misbah


    Senior Design Engineer T.E.S Electronic Solutions (Bangalore-India) www.tesbv.com email-misbah.khan@tes-dst.com
    Thursday, August 11, 2011 6:14 AM
  • Hello,

    thanks for the fast answer.

    I'm not sure if bootpart.cpp is included to my OS. To which *.dll belongs the file bootpart.cpp?

    I found the following components in the image:

    C:\WINCE600\PRIVATE\WINCEOS\DRIVERS\MSFLASH\flashmddcore\mappingtable.cpp
    C:\WINCE600\PRIVATE\WINCEOS\DRIVERS\MSFLASH\flashpart\flashpartitiondriver.cpp

    But they are not available in the source on my platform builder installation.

    On the first start I don't have a MBR, because the NAND flash isn't formatted till now. So, I think the partition dirver creates the MBR. How could I influence the NAND FLash mapping?

    Thanks,

    Andreas

    Thursday, August 11, 2011 6:37 AM
  • Hi Andreas,

    I guess you bootloader and maybe also the Windows CE image are on the beginning of the flash. What you can do is to pass information to the NAND driver once  you have detected the Flash about the starting address where you want to create a Flash files system.

    The bootpart sI thinks should be part of your booloader.

    You als can have a look to use binFS thus Windows CE once booted will not access the bootloader and the image because the partitions having a special marker. I thought the Freescale BSP might have such support implemented.

    Best regards,

    Mike

    Thursday, August 11, 2011 8:38 AM
  • Hi Mike,

    First of all thanks for the help.

    How could I pass the starting address, where I want to create the file system, to the NAND driver? 

    Best regards,

    Andreas

    Thursday, August 11, 2011 9:01 AM
  • Hi Andreas,

    you can do that in the FMD_Init. I don't know the flash driver implementation on the i.MX25 BSP but you could have that information stored in the registry for exampel. Then you need to verify the address received from the system with the start address of your partition and return information that this address can be used or not. I think you can do that in the function FMD_GetBlockStatus.

    I hope that can help you.

    Best regards,

    Mike Engel

    • Marked as answer by Andreas_1981 Thursday, August 11, 2011 9:41 AM
    Thursday, August 11, 2011 9:13 AM
  • Hi Mike,

    for testing I have inserted the following to the FMD_GetBlockStatus() function:

    if (blockID < 30)
       return BLOCK_STATUS_RESERVED;

    Now the driver doesn't use the first 30 blocks for the filesystem. I think I will act on your suggestion to create an registry key for the flash filesystem base address.

    Thanks a lot!

    Andreas

    Thursday, August 11, 2011 9:41 AM