Micron MT29F NAND driver
|
The READ STATUS ENHANCED (78h) command returns the status of the addressed die (LUN) on a target even when it is busy (RDY = 0). This command is accepted by all die (LUNs), even when they are BUSY (RDY = 0).
[in] | nand_addr_t | addr: any valid address within the LUN to check (column address is ignored) |
flash_width,: | value of status register |
Definition at line 543 of file nand_MT29F_lld.c.
References __build_cycle_addr(), __is_valid_addr(), CMD_READ_STATUS_ENHANCED, parameter_page_t::command, device_info, driver_status, DRIVER_STATUS_INITIALIZED, DRIVER_STATUS_NOT_INITIALIZED, NAND_INVALID_NAND_ADDRESS, NAND_SUCCESS, NAND_UNSUPPORTED, OPTIONAL_CMD_READ_STATUS_ENHANCED, PLATFORM_Close(), PLATFORM_Open(), PLATFORM_ReadData(), PLATFORM_SendAddr(), PLATFORM_SendCmd(), PLATFORM_Wait(), and TIME_WHR.
{ flash_width ret; MT_uint8 row_address[5]; /* verify if driver is initialized */ if(DRIVER_STATUS_INITIALIZED != driver_status) return DRIVER_STATUS_NOT_INITIALIZED; /* check input parameters */ if(NAND_SUCCESS != __is_valid_addr(addr)) return NAND_INVALID_NAND_ADDRESS; /* check if this feature/command is supported */ if ((device_info.command & OPTIONAL_CMD_READ_STATUS_ENHANCED) == 0) return NAND_UNSUPPORTED; __build_cycle_addr(addr, row_address); /* init board transfer */ PLATFORM_Open(); /* send command */ PLATFORM_SendCmd(CMD_READ_STATUS_ENHANCED); /* send row address (3rd, 4th, 5th cycle) */ PLATFORM_SendAddr(row_address[2]); PLATFORM_SendAddr(row_address[3]); PLATFORM_SendAddr(row_address[4]); /* wait */ PLATFORM_Wait(TIME_WHR); /* read value */ ret = PLATFORM_ReadData(); /* close board transfer */ PLATFORM_Close(); return ret; }