-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Medium
-
SITSW-6469
-
10.01.00
-
11.01.00
-
-
Duplicate of bug SITSW-7032
OSPI_readDirect and OSPI_isPhyEnable check the flash attributes structure for the PHY being enabled, which is not always reflective of if the PHY is actually enabled. Both functions check for the PHY being enabled by doing this:
OSPI_isPhyEnable const OSPI_Attrs* attrs = ((OSPI_Config *)handle)->attrs; retVal = attrs->phyEnable; return retVal; OSPI_readDirect if(attrs->phyEnable == TRUE)
This attributes structure must be updated manually and does not indicate if the actual PHY is enabled. There are multiple ways to solve this, but the simplest way may be just inspecting the IP register like the OSPI_enablePhy function does.
//1 if enabled, 0 if not
uint32_t phyEnable = CSL_REG32_FEXT(&pReg->CONFIG_REG, OSPI_FLASH_CFG_CONFIG_REG_PHY_MODE_ENABLE_FLD);