Problem of sending reset operation for NAND flash

Shen Aaron-r62966 aaron.shen at freescale.com
Thu Dec 16 04:07:39 EST 2004


Hi,

      I met a problem when sending reset command to nand flash.

	When the command "NAND_CMD_READ0" (0x0) and "NAND_CMD_READ_ID"(0x90) are passed, it 
	can successfully execute. But when we pass "NAND_CMD_RESET"(0xff), it hangs on the statement
	      "while((!(_reg_NFC_NF_CONFIG2&NAND_FLASH_CONFIG2_INT)));". Below is the code:

	------------------------------------------------------------------------------------------
	u32 NAND_Command(IN u16 command)
	{
	    _reg_NFC_NF_CONFIG2&=~NAND_FLASH_CONFIG2_INT;
	
	    _reg_NFC_NAND_FLASH_CMD=command;
	    _reg_NFC_NF_CONFIG2&=~NAND_FLASH_CONFIG2_FCMD;
	    _reg_NFC_NF_CONFIG2|=NAND_FLASH_CONFIG2_FCMD;
	
	     while((!(_reg_NFC_NF_CONFIG2&NAND_FLASH_CONFIG2_INT)));
	    if(!(_reg_NFC_NF_CONFIG2&NAND_FLASH_CONFIG2_INT))
	        return ERR_TIME_OUT;
	
	    return 0;
	}
	------------------------------------------------------------------------------------------
	
	Is there any difference to send the reset command? Anybody can give comments 
	to me?

Best Regards!
Feng Shen (Aaron)







More information about the linux-mtd mailing list