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.

TMS320F28P650DK: for loop delay issue CPU2

Part Number: TMS320F28P650DK


Tool/software:

Hi TI Experts,

I am using tms320f28p650d
from CPU2 i am toggling a gpio with creating a for loop delay
i can see the difference between toggling in debug and toggling in flash

i am generating a 100usec pwm 
there is no change in the pwm  in both modes

simillarly i am transmitting a string with same for loop delay with baud rate of 9600
the string is transmitting correctly but 
time after one print to another is different in debug and flash


but all these are working with same in case of CPU1 
 my concern is about cpu2 only 
cpu1 is working perfectly fine in both debug and flash modes

Any guidance, documentation links, or example projects would be greatly appreciated.

Thanks in advance!

Ranjith.

  • Hi Ranjith,

    When you are executing with the debugger, are you running a flash build of the project or a RAM build? RAM will have better performance, see the description here. The performance of a peripheral (like ePWM) won't be affected by the flash vs. RAM difference if the operation is done purely in hardware (example: if the PWM toggle is not executing code on the CPU each time). 

    For your question about CPU2, see the guide here about how to debug multicore projects.

    Best Regards,

    Delaney

  • Thanks for the reply!

    defining  _FLASH resoved my issue




    #ifdef _FLASH
    #ifndef CMDTOOL
    //
    // 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);
    #endif
    //
    // Call Flash Initialization to setup flash waitstates. This function must
    // reside in RAM.
    //
    Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
    #endif