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.

MCU-PLUS-SDK-AM243X: Update to SDK 08.05/08.04 Flash-driver-problems

Part Number: MCU-PLUS-SDK-AM243X

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:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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, &reg);
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);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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":

Fullscreen
1
(((reg >> octCfg->shift) & 0x01) == 1) && (((reg >> dCfg->shift) & 0x01) == 1)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

will always evaluate to true, since it's not a bit that is set but a whole byte. 0xFF with 0x01 and not shifted is true either way. This means it will assume DDR is enabled when in fact only extended SPI is enabled.

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:

Fullscreen
1
(((reg >> octCfg->shift) & octCfg->mask) == octCfg->cfgRegBitP) && (((reg >> dCfg->shift) & dCfg->mask) == dCfg->cfgRegBitP)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Can you confirm this is a bug?

Best regards

Felix