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.

TMS320F280025C: Possible error in RAM initialization status check library function

Part Number: TMS320F280025C
Other Parts Discussed in Thread: C2000WARE

Hi,

I believe I have found an error in driverlib memcfg file MemCfg_getInitStatus() function.

Suppose I'm initializing all the RAM sections I call MemCfg_initSections and pass 0xFFFFFFFFU and in the switch case within the function before writing to the INIT registers the function first clears MSB using MEMCFG_SECT_NUM_MASK.

case MEMCFG_SECT_TYPE_MASK:
//
// Initialize all sections.
//
HWREG(MEMCFG_BASE + MEMCFG_O_DXINIT) |= MEMCFG_SECT_NUM_MASK &
MEMCFG_SECT_DX_ALL;
HWREG(MEMCFG_BASE + MEMCFG_O_LSXINIT) |= MEMCFG_SECT_NUM_MASK &
MEMCFG_SECT_LSX_ALL;
HWREG(MEMCFG_BASE + MEMCFG_O_GSXINIT) |= MEMCFG_SECT_NUM_MASK &
MEMCFG_SECT_GSX_ALL;
HWREG(MEMCFG_BASE + MEMCFG_O_MSGXINIT) |= MEMCFG_SECT_NUM_MASK &
MEMCFG_SECT_MSGX_ALL;

But when checking the status using the MemCfg_getInitStatus() function the comparison is done directly without the mask

case MEMCFG_SECT_TYPE_MASK:
//
// Return the overall status.
//
if((HWREG(MEMCFG_BASE + MEMCFG_O_DXINITDONE) ==
MEMCFG_SECT_DX_ALL) &&
(HWREG(MEMCFG_BASE + MEMCFG_O_LSXINITDONE) ==
MEMCFG_SECT_LSX_ALL) &&
(HWREG(MEMCFG_BASE + MEMCFG_O_GSXINITDONE) ==
MEMCFG_SECT_GSX_ALL) &&
(HWREG(MEMCFG_BASE + MEMCFG_O_MSGXINITDONE) ==
MEMCFG_SECT_MSGX_ALL))
{
status = MEMCFG_SECT_NUM_MASK;
}
else
{
status = 0U;
}

I believe here also we need to mask out the MSB for comparison if not this will always go to else statements.

Could you please clarify this?

Regards,

Harsha