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.

CCS/TMS320F28388D: IPC Boot CPU2

Part Number: TMS320F28388D

Tool/software: Code Composer Studio

Hello, 

I am using the TMS320F28388D controller, I am reusing the example code provided by TI for the booting the CPU2 from CPU1 on FLASH SECTOR 0, i wanted to understand if the below code provided can be written in bitwise or register, do we have any example code for it.

I am interested in expanding the macros using the registers instead of base address

void SysCtl_controlCPU2Reset(SysCtl_CoreReset control)
{
UINT32 clearvalue;


//Based on whether the Core is to be reset or not,
//the core would be put into reset or brought out.

if(control != 0x0U)
{

EALLOW;

//On matching key, write to the reset bits would be successful
// Core reset is deactivated.
HWREG(DEVCFG_BASE + SYSCTL_O_CPU2RESCTL) =
((UINT32)SYSCTL_CPU2RESCTL_RESET | (SYSCTL_REG_KEY &
SYSCTL_CPU2RESCTL_KEY_M));

EDIS;
}
else
{
//->Invoke the macro EALLOW
EALLOW;

clearvalue = HWREG(DEVCFG_BASE + SYSCTL_O_CPU2RESCTL);

clearvalue &= ~SYSCTL_CPU2RESCTL_RESET;

HWREG(DEVCFG_BASE + SYSCTL_O_CPU2RESCTL) = (SYSCTL_REG_KEY &
SYSCTL_CPU2RESCTL_KEY_M) | clearvalue;


EDIS;
}
}

UINT16 SysCtl_isCPU2Reset(void)
{

return((HWREGH(DEVCFG_BASE + SYSCTL_O_RSTSTAT) & SYSCTL_RSTSTAT_CPU2RES)
== 0U);
}

  • Hi Nagesh,

    Do you mean you want to convert this code to bitfields format?

    Yes, you could do that. All the registers used in this function are available in the bitfields headers. For example HWREG(DEVCFG_BASE + SYSCTL_O_CPU2RESCTL) is accessible as DevCfgRegs.CPU2RESCTL

    Note that the function SysCtl_controlCPU2Reset is used to reset the CPU2 core. The CPU2 boot is done by Device_bootCPU2 function

    Regards,

    Veena