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/TM4C123GH6PM: CCS/TM4C123GH6PM Is not connecting to the debugger interface

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

I am working with the tiva c series launchpad and I accidentally set the system core clock to 21052 by initialising the system ROM_SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_CFG_VCO_480 | SYSCTL_USE_PLL) and now when I am clicking on the debugger interface, it says Error connecting to the target. Although device is being detected at port /dev/ttyACM0 and led is blinking, but way much slower because of the low value of xtal. Still it is refusing to connect to the debugger interface. How can I program it to correct the system clock??  

  • Can't you connect to the target for uploading a new program?
    Then look for the Target Unlock option of the UniFlash program available from TI.
    As for properly configuring the clock, there are several examples on the forum and on the TivaWare example folder.
  • Hi,
     
    In CCS, you might try to hold the reset pin active first. Right after you release the reset you will try to connect. You may need to do this multiple times to see if it works. The idea is for the debugger to connect before the code has reached ROM_SysCtlClockSet().

    You can also use either the Uniflash as suggested by Bruno or the LM Flash programmer to erase/unlock the flash. See section 5.3.1 in this app note.

  • One more thing to try is to reduce the JTAG frequency to less than 1/10 of the  system clock. If this does not work then try unlock. See the lower right where to change the JTAG freq.

  • I am developing in Linux environment. Tried installing this tool but got some problem after installing. Maybe dependencies problem. I will fix later. But for now is there any option or setting for JTAG debugger speed, so that I would be able to download/erase the last program at least at lowest speed?

  • Where is this setting? can you please navigate me to that one? that would be appreciable.
  • In CCS Edit, go to View->Target Configuration. From here go look for your the target configuration that assoicate with the project. Double-click on the target configuration, i.e. xyz.ccxml then you will see the screenshot like below. At the upper right under the Advanced Setup, click the Target Configuration link then it will bring you to the screenshot that I posted earlier.

    You will then see below.

    Click on the CORTEX_M4_0 then you will see the screenshot that I posted in my earlier reply. Try to reduce the JTAG speed and see if it works.

  • Erasing Flash with UniFlash solved my problem. Connection with the uniflash was the tricky part. I had to tap the rest button randomly at the startup and it worked.

    Thanks All

  • Feel your (and that of SO many others') pain.

    Firm/I have found that a, "Good Defensive Posture" is provided by ALWAYS imposing a "DELAY" just prior to (any) attempted setting/modification of the MCU's System Clock.    (2-3 second delay spectacularly "raises the odds" of your "tapping" (being reduced to just ONE) -  and then, "Connecting!")

    It is also possible to, "Require (some) unique/unusual input" to (allow) set/mod of the System Clock.     These may appear w/in "debug" code settings - and bypassed during "production."

    Prevention - most always - trumps the "cure."