none
How to count the number of BAD blocks from any application RRS feed

  • Question

  • Dear all,

     

    I am working with Freescale imx51 BSP.

    I am having NAND Flash.

    Is there any way to count the number of bad blocks present in NAND Flash.

    Using any application.

     

    With Thanks

    nadini

    Tuesday, March 15, 2011 6:57 AM

All replies

  • I think that the only way is to develop a stream driver that use FMD of NAND Flash to get this information. You can develop the function XXX_IOControl for this and expose it to applications.

    Regards, Paolo.

    Tuesday, March 15, 2011 7:07 AM
  • Dear sir,

     

    Thank you for your reply.

    I will try the same and will update you.

     

     

     

    With Thanks

    nadini

    Tuesday, March 15, 2011 2:18 PM
  • If the Flash Driver is in MSFlash MDD/PDD model, you can use either IOCTL_FLASH_PDD_GET_BLOCK_STATUS (http://msdn.microsoft.com/en-us/library/ee481917.aspx) or IOCTL_FLASH_PDD_READ_PHYSICAL_SECTORS (http://msdn.microsoft.com/en-us/library/ee484667.aspx) to retrieve the block status info.

    Even it is not a MSFlash MDD/PDD, convert an existing FMD into a MSFlash PDD is still easy. All wrapper functions are provided in public\common\oak\drivers\block\msflash. The concept is similar to paolopat said but just reuse the existing libraries.
    Or you can have a custom IOCTL in FMD_OEMIoControl to disclosure the block status info.

    Tuesday, March 15, 2011 9:58 PM