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.

TM4C1231D5PM: Unable to debug

Part Number: TM4C1231D5PM
Other Parts Discussed in Thread: EK-TM4C123GXL

I am trying to debug a TM4C1231D5PMT microcontroller, but can't connect to the MCU through JTAG. CCS attempts to load the program, but will eventually create the following error message,

CORTEX_M4_0: JTAG Communication Error: (Error -1170 @ 0x0) 
Unable to access the DAP. Reset the device, and retry the operation. 
If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). 
(Emulation package 9.2.0.00002) 

CORTEX_M4_0: Failed to remove the debug state from the target before disconnecting.
There may still be breakpoint op-codes embedded in program memory.  
It is recommended that you reset the emulator before you connect and reload your program before you continue debugging

Running dbgjtag.exe to unlock the DAP works,

C:\ti\uniflash_5.0.0\deskdb\content\TICloudAgent\win\ccs_base\common\uscif>dbgjtag.exe -f @xds100v2 -Y unlock,mode=tiva

Executing the unlock procedure.

Assert and hold reset while powering up the device.
Press any key to continue.

Release reset.
Press any key to continue.

Power cycle the board to complete the unlock procedure.

C:\ti\uniflash_5.0.0\deskdb\content\TICloudAgent\win\ccs_base\common\uscif>

When I try to program the MCU again I get the same error message,

CORTEX_M4_0: JTAG Communication Error: (Error -1170 @ 0x0) 
Unable to access the DAP. Reset the device, and retry the operation. 
If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). 
(Emulation package 9.2.0.00002) 


CORTEX_M4_0: Failed to remove the debug state from the target before disconnecting. 
There may still be breakpoint op-codes embedded in program memory. 
It is recommended that you reset the emulator before you connect and reload your program before you continue debugging

The CCS project I am using was initially a uart_echo example program for the ek-tm4c123gxl lauchpad. Could this be causing an issue?

I have attached the project to this thread. 7506.FIRMWARE.zip

The TM4C1231D5PMT microcontroller is on a custom board,

Replacing the MCU didn't fix the issue.

TM4C1231D5PMT schematics are also attached. .8475.MCU_Schematic.pdf

Thanks,

Allan

  • I forgot to change the clocking source to the internal 16MHz oscillator. Changed from this,

    //
    // Set the clocking to run directly from the crystal.
    //
    ROM_SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
                       SYSCTL_XTAL_16MHZ);
                       
                       

    To this,

     //
    // Set the clocking to run directly from the internal osc.
    //
    ROM_SysCtlClockSet(SYSCTL_OSC_INT);

  • Hi,

      Glad you resolve the problem on your own. I do see in your schematic the OSCI0/OSC1 as NC and that means you are relying on the internal OSC as the clock source to provide the system clock. If you don't make any call to SysCtlClockSet() then it defaults to the internal 16Mhz PIOSC.

      I also run your program on my LaunchPad. After some modification it is working. You miss the interrupt vector in the start up file for both UART0 and Timer0. After adding it, I can see below after I type 'M', 'R' and etc.