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: CPU2 Slower than CPU1

Part Number: TMS320F28388D

Hello

I am running the same function in both cores (in STANDALONE mode) and I get a benchmark of 1.8ms in CPU1 and  2.8ms running in CPU2.

I suspect the code is running from flash, but in In CPU2 main function I have a call to:

   InitSysCtrl();

which calls:

//
// InitSysCtrl - Initialization of system resources.
//
void InitSysCtrl(void)
{
    //
    // Disable the watchdog
    //
    DisableDog();

#ifdef _FLASH
    //
    // Copy time critical code and Flash setup code to RAM. This includes the
    // following functions: InitFlash()
    //
    // The  RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart
    // symbols are created by the linker. Refer to the device .cmd file.
    //
    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

    //
    // Call Flash Initialization to setup flash waitstates. This function must
    // reside in RAM.
    //
    InitFlash();


#endif

Of course in the cmd file I have the defitition of:

#if defined(__TI_EABI__)
   .TI.ramfunc : {} LOAD = FLASH3,
                    RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
                    LOAD_START(RamfuncsLoadStart),
                    LOAD_SIZE(RamfuncsLoadSize),
                    LOAD_END(RamfuncsLoadEnd),
                    RUN_START(RamfuncsRunStart),
                    RUN_SIZE(RamfuncsRunSize),
                    RUN_END(RamfuncsRunEnd),
                    ALIGN(8)
#else
   .TI.ramfunc : {} LOAD = FLASH3,
                    RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
                    LOAD_START(_RamfuncsLoadStart),
                    LOAD_SIZE(_RamfuncsLoadSize),
                    LOAD_END(_RamfuncsLoadEnd),
                    RUN_START(_RamfuncsRunStart),
                    RUN_SIZE(_RamfuncsRunSize),
                    RUN_END(_RamfuncsRunEnd),
                    ALIGN(8)
#endif

Is there sopmething else I need to have in account?

thank you

  • Hi,

    Your code look good. Just make sure in both case code is running from same memory (like RAM or Flash). If it's running from Flash then check the wait state on both CPU and make sure both are same. 

    Regards,

    Vivek Singh

  • Vivek Singh said:

    Hi,

    Your code look good. Just make sure in both case code is running from same memory (like RAM or Flash). If it's running from Flash then check the wait state on both CPU and make sure both are same. 

    Regards,

    Vivek Singh

    Thank you Vivek.

    Both projects are set as Active Flash, and I have the following  cmd commands:

    I think I am missing something. Do you have an example of standalone then loading to RAM I can check?

    Best Regards

  • Hello Vivek

    I wonder if you have an example regarding this issue to check our setup.

    Thank you

  • Hi,

    It will be better if you could send me your project and the step to follow to reproduce this issue ?

    Regards,

    Vivek Singh

  • Thank you Vivek.

    I will prepare an example of our code, without the IP protected parts and will send it to you ASAP.

    Best regards.

  • Hello Vivek.

    Is the CPU2 project enoguh?

    Or do you need both projects?

    Regards

  • If you could provide both CPU1/CPU2 code, that will be better.

    Regards,

    Vivek Singh

  • Hello again Vivek.

    Because of IP causes I cannot share the whole code, but I understand that running the same code on both CPUs and measuring its time of execution could be a valid test for you, right?

    Regards

  • Hi,

    It is always good to have the full code which is is showing the issue as long as it does not have dependency on any hardware component but if you can not share full code then you can have a sample code and test the same to check that it does have the issue which you had on original code and that should be fine.

    Regards,

    Vivek Singh