Part Number: TMS320F28388D
Hello all,
I want to re-init CM RAM sectors (Dedicated RAM, Shared RAM and MSG RAM). I have gone through TRM and from section "41.9.1.9 RAM Initialization screenshot attached below - " I understood that this can be achieved by "setting the INIT bit to ‘1’ for the specific RAM block in INIT registers and application must poll for the INITDONE bit to be set for that RAM block in the INITDONE. Unless this bit gets set, no access should be made to that RAM memory block".

And from section shown below in image 41.12.2 CM_MEMCFG_REGS registers I found respective registers offset for INIT'ing and status checking and base address of being CMMEMCFG_BASE - 0x400F_E000

And as per the above 2 screenshots I created below snippet of code:
#define CM_MEMCFG_CxLOCK 0
#define CM_MEMCFG_CxINIT 0x08
#define CM_MEMCFG_CxINITDONE 0x0C
bool is_c1_ramsector_initdone()
{
uint8_t status1 = 0;
status1 = (HWREG(CMMEMCFG_BASE + CM_MEMCFG_CxINITDONE) & 0x01);
return (status1);
}
bool is_c0_ramsector_initdone()
{
uint8_t status0 = 0;
status0 = (HWREG(CMMEMCFG_BASE + CM_MEMCFG_CxINITDONE) & 0x00);
return (status0);
}
void access_memcfg_ram_regs()
{
HWREG(CMMEMCFG_BASE + CM_MEMCFG_CxLOCK) &= 0xFFFFFFFC; //unlocks write access allowed
do
{
HWREG(CMMEMCFG_BASE + CM_MEMCFG_CxINIT) |= 0x01;//c0 init
} while( !( is_c0_ramsector_initdone() ) ); //checks for the status of C0 inited or not ? -- Code is stuck in this while loop infinetely
do
{
HWREG(CMMEMCFG_BASE + CM_MEMCFG_CxINIT) |= 0x02;//c1 init
} while( !(is_c1_ramsector_initdone() ) );
}
I'm calling this function in main() and also tried calling explicitly when certain event occurs/Command received from other core,
And As per the above code CxINIT register is supposed to be configured (b1 is 1, b0 is 1) and I see that it is not taking effect.

Can someone let me know what can be done to achieve my requirement of resetting or re-initing RAM so that it should be just like POR of CM.
Regards,
--pranay





