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.

TMS320F28388D: RAM initialization of CPU2.

Part Number: TMS320F28388D


Hi champs,

According to CPU2 Boot Flow Figure on TRM, CPU2 do RAM initialization only when POR. I use CCS in debug mode for evaluation, when I hit Restart icon, software will restart again and I find that the contents of my global variables will be initialized, is this reasonable?

Another question is that can I use CPU1 to reset CPU2 so that CPU2 restart again?

Thanks for your help.

-Luke

  • Hi,

    By default, the EABI compiler initializes all the global variables as part of the c_init00 function. If the globals are not explicitly initialized in the application, the compiler will zero-initiliaze these.

    This feature can be turned off by using the NOINIT pragma.

    It is CPU1 which brings the CPU2 out of reset. Refer to Device_bootCPU2 function in device.c for more details. Also refer to the TRM for for more details on CPU2RESCTL register.

    Regards,

    Veena

  • Veena,

    I use COFF format and get same result, when I hit Restart icon in debug mode, CPU2 will initialize my global variables, it seems not match the CPU2 boot flow chat, is this reasonable?

    I know CPU2RESCTL register and had a try, I can reset CPU2 and bring it out of reset by setting CPU2RESCTL register, but seems that CPU2 doesn't execute program from entry point again, what else should I do so that CPU2 can run again?

    Regards,

    Luke

  • Hi Luke,

    Luke Chen said:
    I use COFF format and get same result, when I hit Restart icon in debug mode, CPU2 will initialize my global variables, it seems not match the CPU2 boot flow chat, is this reasonable?

    Are these global variables explicitly initialized? (Like int var = 10;) Both EABI and COFF formats initialize such variables. The difference between EABI and COFF is that, EABI compiler will initialize the uninitialized variables as well (int var; -> var will be initialized to 0 with EABI.)

    Luke Chen said:
    I know CPU2RESCTL register and had a try, I can reset CPU2 and bring it out of reset by setting CPU2RESCTL register, but seems that CPU2 doesn't execute program from entry point again, what else should I do so that CPU2 can run again?

    Are you using the Device_bootCPU2 function? This also sends the IPC commands required for CPU2 boot before configuring the CPU2RESCTL.

    Regards,

    Veena