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.

How to stop the rti counters on a halt during debugging session CCS6, RM57Lxx.

Other Parts Discussed in Thread: HALCOGEN, TMS570LC4357, LAUNCHXL2-570LC43

How to stop the rti counters on a halt during debugging session.

Hello,

I know there is an option to stop the RTI counters when the processor is halted during debugging session.

I cannot find where the option is.

Thanks for your help

Jerome

  • Jerome Beauvais said:
    I know there is an option to stop the RTI counters when the processor is halted during debugging session.

    I cannot find where the option is.

    For RM57Lxx devices I can't see any option in the CCS Debug properties to control the RTI Continue on suspend (COS) bit in the RTI Global Control Register (RTIGCTRL).

    [compared with MSP430 devices where the CCS Debug properties allow a selection of which clock(s) are stopped when the processor is halted].

    If you are using a HALCoGen project there is a "Enable/Disable Continue of Suspend" option on the "RTI1 General" tab.

  • 8203.tms570xc_rm57x_cross_trigger.gelHI Jerome,

     For RM57x there is an on-chip CTI (Cross Trigger Interface) module that is programmable to route the debug acknowledge signal (DBGACK is asserted when halted) from the CPU to the rest of the devices. The CTI must be enabled first before the rest of the system such as RTI can see the DBGACK being asserted and in consequence stop the counter during debug state.

     Try this GEL script and enable all CTI in the device.

  • Hi Chester

    Thanks a lot for your help.

    I tried to enable the "Enable/Disable Continue of Suspend" option on the "RTI1 General" tab.

    This does not solve the problem.

    With a similar configuration of HCG and with RM48 USB Stick Development Kit it’s working very well.

    What can I do?

    Jerome

  • Hi Jerome,
    Did you try to enable the CTI (Cross Trigger Interface) with the GEL script I provided? As I mentioned simply clicking the checkbox for 'Enable/Disable Continue on Suspend' is not sufficient for LC4357 device. You need to also enable the CTI modules.
  • Hi Charles

    Thanks a lot for your help.

    I tried to install the GEL: “tms570xc_rm57x_cross_trigger.gel”


    But when I launch the program it fails on processTimeOut(): subroutine wrote in assembly language.

    processTimeOut() is the routine called by RTI interrupt.


     


    What can I do?

    Jerome

     

  • Hi Jerome,
    I'm not too clear on your question. What does processTimeout() do? Do you have any breakpoint or watchpoint setup that might have halted the CPU? Since you enable the CTI the DBGACK as a result of the CPU halting will be asserted to the RTI. To verify that it works you can simply continuously watch the RTI counter in the register window and see if it keeps changing or not depending on if you set the COS bit to 1 or 0.
  • Hello,
    I did the following steps:
    1) Launch the debugger
    2) Load the GEL file with success


    3) Setup all CTI


    4) Launch the program without any breakpoint



    Now the program stops alone in the main loop. I cannot launch it again; I cannot do a step by step action, the PC stay to the same position without error.

  • Kind Regards
    Thanks for your help
    Jerome
  • Let me try on my side.
  • For information i Work with:
    TMDXRM57LHDK Dev Board
    Spectrum Digital XDS560V2 STM USB Emulator
    Kind Regards
    Jerome
  • Charles Tsai said:
    As I mentioned simply clicking the checkbox for 'Enable/Disable Continue on Suspend' is not sufficient for LC4357 device. You need to also enable the CTI modules.

    With a TMS570LC4357 ran a test using CCS 6.1.3 and when halted in the debugger:

    1. When the Setup_All_CTI() wasn't run the RTI registers continued to increment regardless of the COS setting.
    2. After running Setup_All_CTI() the RTI registers stopped debugger when the COS bit was clear, and incremented when the COS bit was set.

    This matches the described behavior. However, from the TMS570LC4357 documentation I can't seem to find the description of the interaction of the CTI modules. Should the documentation be updated?

    Edit: The tests was run on a LAUNCHXL2-570LC43 using the onboard XDS110 emulator, and I found the CTI interconnection description in the Debug Subsystem section of the datasheet.

  • Hi Chester,
    Thanks for confirming that the GEL works for you. But I don't know why it is creating problem for Jerome.
  • HI Jerome,

     I don't why it is not working for. It seems that a debug request (not from the debugger) is requesting the CPU halt. I don't know where this debug request is coming from. If you do the Disable_ALL_CTI does it remove the problem? I want to make sure that the GEL is the cause of the problem.

     Can you also try this modified GEL. I don't know if it will make a difference for you. Please let me know. Both versions work for me though.

    7776.tms570xc_rm57x_cross_trigger.gel

  • Hi Charles
    Thanks Very much for your help.
    With the first GEL.
    Before installing the GEL the program works.
    After installing the GEL and Setting all CTI the program stop alone and cannot start again.
    After disable all CTI it’s the same problem, the program stop and I cannot start it again.
    With the Second GEL.
    All is working very well.
    The RTI counters are stopped during step by step operation and run when the program is launched.
    Just a last question: When I close the debugger and launch it again I need to reload the GEL. Is that normal? Is it possible to install permanently the GEL in the debbuger?
    Thanks again for your help
    Jerome

  • HI Jerome,

    This is what I did in the tms570lc43xx.gel, I guess this can be added in the future CCS update.

    StartUp(){
    GEL_LoadGel("..\\ccs_base\\emulation\\gel\\tms570xc_rm57x_cross_trigger.gel");
    } /* StartUp() */
  • Charles Tsai said:
    Thanks for confirming that the GEL works for you. But I don't know why it is creating problem for Jerome.

    Just to say I tried the 2nd version of the GEL script on a LAUNCHXL2-570LC43, and the 2nd version behaved in the same way as the 1st version.

    i.e. with both versions of the GEL script no problems stepping in the debugger and Setup_All_CTI stopped the RTI counters when halted with the COS bit clear.

  • Hello Charles,

    I looked into the GEL script but I couldn't find a clear documentation about the configuration registers you use to enable the CTI (e.g. bit ECT in register CTICONTROL).

    Where can we find the description for these registers?

    Thank you,
    regards,
    Marcio
  • Hi Marcio,
    The CTI registers are described in the ARM CoreSight Debug Userguide. infocenter.arm.com/.../CHDGDIHE.html
  • Hello Charles,

    Exactly what I was looking for!

    But I have a question: What is the link between this document you pointed ("CoreSight SoC Technical Reference Manual") and the Cortex-R5 TRM?
    The Cortex-R5 makes a reference just to the document "CoreSight ETM-R5 Technical Reference Manual" that is not the same as the CoreSight SoC TRM you pointed.

    I'm just trying to understand how TMS570LC documents are linked to the CoreSight SoC TRM, since the lack of a clear link between these documents is the reason why I couldn't find by myself how to stop RTI when CPU halts.

    Thank you,
    Marcio
  • Hi Marcio,
    Cortex-R5 TRM only talks about the processor. Coresight SoC TRM talks about all modules that are used in ARM's platform of debug and trace support. The CoreSight ETM is only about the ETM module. I don't know why the ETM is not described as part of the CoreSight TRM and just left alone as a single document. Perhaps there is some history behind it where the development of the ETM module predate the CoreSight platform. This maybe something you can check with ARM.

  • Hi Charles,

    Thank you for the info.

    And if you can forward internally a suggestion, it would be helpful if TI could mention, in the Reference Manual, the document you sent me.

    I'm sure this would save time for a lot of people (including TI support time) trying to do some basic debug on RTI.

    Anyways, I really appreciate your help.

    Marcio