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:无法调试

Guru**** 1812430 points
Other Parts Discussed in Thread: EK-TM4C123GXL
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1119715/tm4c1231d5pm-unable-to-debug

器件型号:TM4C1231D5PM
Thread 中讨论的其他器件:EK-TM4C123GXL

我正在尝试调试 TM4C1231D5PMT 微控制器、但无法通过 JTAG 连接到 MCU。 CCS 尝试加载程序、但最终会创建以下错误消息:

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

运行 dbgjtag.exe 解锁 DAP 的工作方式、

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>

当我再次尝试对 MCU 进行编程时、我会收到相同的错误消息、

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

我要使用的 CCS 项目最初是 EK-tm4c123gxl launchpad 的 UART_echo 示例程序。 这是否会导致问题?

我已将项目附加到此线程。 e2e.ti.com/.../7506.FIRMWARE.zip

 TM4C1231D5PMT 微控制器位于定制板上、

更换 MCU 未解决问题。

 还随附了 TM4C1231D5PMT 原理图。 .e2e.ti.com/.../8475.MCU_5F00_Schematic.pdf

谢谢、

Allan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我忘记将时钟源更改为内部16MHz 振荡器。 已从此处更改、

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

    为此、

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

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

     很高兴您自己解决了问题。  我确实在原理图中看到 OSCI0/OSC1为 NC、这意味着您依赖内部 OSC 作为时钟源来提供系统时钟。 如果你不对 SysCtlClockSet()进行任何调用、那么它默认为内部16MHz PIOSC。

     我还在我的 LaunchPad 上运行您的程序。 经过一些修改后、它可以正常工作。 您错过了 UART0和 Timer0的启动文件中的中断矢量。 添加后、我可以在键入"M"、"R"等后看到下面的内容