This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
so we updated to the new SDK 08.05. And for us also the flash-driver-implementation changed. I guess it was also the case with 08.04. but last time we had no time to investigate since it already didn't work anymore at this time.
I noticed the following, which seems to be a bug:
The Flash_set888mode-function has the following snippet:
if(octCfg->isAddrReg && dCfg->isAddrReg && (dCfg->cfgReg == octCfg->cfgReg)) { /* Do both the configs together */ uint8_t reg = 0U; status = Flash_norOspiRegRead(config, octCfg->cmdRegRd, octCfg->cfgReg, ®); if(SystemP_SUCCESS == status) { /* Octal DDR is special. Check if it is already enabled */ if((((reg >> octCfg->shift) & 0x01) == 1) && (((reg >> dCfg->shift) & 0x01) == 1)) { /* Already 8D */ } else { /* Clear the config bits in the register */ reg &= ~(uint8_t)(octCfg->mask | dCfg->mask); /* Bitwise OR the bit pattern for setting the dummyCycle selected */ reg |= (octCfg->cfgRegBitP << octCfg->shift); if(pCfg->protocol == FLASH_CFG_PROTO_8D_8D_8D) { reg |= (dCfg->cfgRegBitP << dCfg->shift); } status += Flash_norOspiRegWrite(config, octCfg->cmdRegWr, octCfg->cfgReg, reg); } } OSPI_setProtocol((OSPI_Handle)(obj->ospiHandle), gFlashToSpiProtocolMap[pCfg->protocol]); }
This may work for flash-devices with bit-accessed registers. But there are also flashes, e.g. by ISSI which have whole bytes at their adresses. e.g.:
And with this expression the check for "Check if it is already enabled":
(((reg >> octCfg->shift) & 0x01) == 1) && (((reg >> dCfg->shift) & 0x01) == 1)
To get our flash to work I will just remove this part and always set the Flash to DDR-mode.
or I guess this should also work then:
(((reg >> octCfg->shift) & octCfg->mask) == octCfg->cfgRegBitP) && (((reg >> dCfg->shift) & dCfg->mask) == dCfg->cfgRegBitP)
Can you confirm this is a bug?
Best regards
Felix
Hi Felix,
You are correct. The above code will not work for the ISSI type of devices. I have reported it to the SW team. Here is the JIRA ticket: MCUSDK-9525
Best regards,
Ming