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/TMS570LC4357-EP: Enable CTI (Cross Trigger Interface) module via a GEL script

Part Number: TMS570LC4357-EP

Tool/software: Code Composer Studio

Hello,

I found several forum postings discussing why the RTI module doesn't pause on debug halt.  The CTI module must be enabled for this MCU when the debug session is started.

I downloaded the tms570xc_rm57x_cross_trigger.gel script and modified my tms570lc43xx.gel script as recommended:

StartUp(){
GEL_LoadGel("..\\ccs_base\\emulation\\gel\\tms570xc_rm57x_cross_trigger.gel"); 
} /* StartUp() */

This seems to work, even if I don't manually run Scripts | Configure Cross Triggering | Setup_All_CTI.

1) Do I have to manually run the script Setup_All_CTI each time I start a debug session?

2) I'm using CCS v6.0.1.00040 to keep compatibility with some old projects.  Do newer versions of CCS have this script built in?  (Maybe CCS v7.2.0?)

Thank you, Charlie Johnston

  • Hello Charles,

    You can use COS bit in RTIGCTL register to configure the counter mode. When COS is cleared, the counter are stopped while in halting debug mode.

  • Hi QJ,

    Please look at the Original Question referenced above.  The COS bit is only active when the CTI module is enabled.

    It's also discussed in the following forum posts:

    e2e.ti.com/.../2147145

    e2e.ti.com/.../1882441

    e2e.ti.com/.../2000595

    e2e.ti.com/.../1883762

    Thanks, Charlie Johnston

  • Thanks Charlie,

    1. You have to manually run the script Setup_All_CTI after the configuration (for LCx and RM57) is launched. If the configuration is not removed or terminated, this script, disconnecting the target and reconnecting the target don't affect the CTI setting, you don't need to re-call Setup_All_CTI.

    2. No, it is not included in the new CCS release.

  • Hi QJ,

    What is considered removing or terminating the configuration?  Would this include exiting CCS and restarting it?

    Thanks, Charlie

  • Hi Charlie,

    The GEL file defined in the target configuration file will be automatically loaded when the configuration is launched (Target Configurations Panel). The CTI hotmenus will be removed from the scripts drop-down menu after the target configuration is removed or terminated (Debug panel).

    This is not included in new CCS. I will ask them to include from next revision. Thanks

  • Hi QJ,

    For an automatic solution, I modified the tms570lc43xx .gel file that came with CCS.  I added the four Enable_CTIx() functions from tms570xc_rm57x_cross_trigger.gel, then called them in the function OnResetDetected() as part of the condition if(MemSwitchState == COMPL).

        if(MemSwitchState == COMPL){
    
            memmap(FLASH, EMIF);
            MemoryMap = FLASH;
            GEL_TextOut("\tMemory Map Setup for Flash @ Address 0x0 due to System Reset\n",,,,,);
    
    /* Functions imported from tms570xc_rm57x_cross_trigger.gel */
    /*  so they don't have to be run manually every time CCS is started */
            Enable_CTI1();
            Enable_CTI2();
            Enable_CTI3();
            Enable_CTI4();
        }
    
    

    Thank you for your help and your time.

    Charlie Johnston