diff --git a/source/board/flash/ospi/flash_nand_ospi.c b/source/board/flash/ospi/flash_nand_ospi.c index 1537a4b..2edb667 100644 --- a/source/board/flash/ospi/flash_nand_ospi.c +++ b/source/board/flash/ospi/flash_nand_ospi.c @@ -1206,7 +1206,7 @@ static int32_t Flash_nandOspiReadId(Flash_Config *config) FlashCfg_ReadIDConfig *idCfg = NULL; uint8_t idCode[FLASH_OSPI_JEDEC_ID_SIZE_MAX]; - uint32_t idNumBytes = 3; + uint32_t idNumBytes = 2; uint32_t numAddrBytes = 0; if(config != NULL) @@ -1237,16 +1237,10 @@ static int32_t Flash_nandOspiReadId(Flash_Config *config) uint32_t manfID, devID; manfID = (uint32_t)idCode[0]; - devID = ((uint32_t)idCode[1] << 8) | ((uint32_t)idCode[2]); + devID = (uint32_t)idCode[1]; if (!((manfID == config->attrs->manufacturerId) && (devID == config->attrs->deviceId))) { - /* Try the other 3 bytes */ - manfID = (uint32_t)idCode[3]; - devID = ((uint32_t)idCode[4] << 8) | ((uint32_t)idCode[5]); - if (!((manfID == config->attrs->manufacturerId) && (devID == config->attrs->deviceId))) - { - status = SystemP_FAILURE; - } + status = SystemP_FAILURE; } else {