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/CC3220SF-LAUNCHXL: JTAG communication error: Error: Stat [ JLINKARM_IsHalted() call ] failed!

Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: SEGGER

Tool/software: Code Composer Studio

Similar to https://e2e.ti.com/support/tools/ccs/f/81/t/860121, I am no longer able to connect any debugger to my custom boards or the launchpad. In the case of custom boards, I get the following error:

Cortex_M4_0: Error: Stat [ JLINKARM_IsHalted() call ] failed!
Cortex_M4_0: Trouble Halting Target CPU: Halt failed!

...

Cortex_M4_0: Unable to determine target status after 20 attempts

When I attempt to debug using the Launchpad I can load about half the program, then I get these errors:

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 8.1.0.00012)
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
Cortex_M4_0: Error occurred during flash operation: Could not read register R2: target is not connected
Cortex_M4_0: Flash Programmer: Error while writing to Flash memory
Cortex_M4_0: File Loader: Memory write failed: Unknown error
Cortex_M4_0: GEL: File: C:\Users\mypath\dbg\my_project.out: Load failed.

SOP mode is (2-1-0): 0-1-0 

I've also tried the Launchpad using SWD, but it no longer works either. 

Cortex_M4_0: JTAG Communication Error: (Error -615 @ 0x0) The target failed to see a correctly formatted SWD header. The connection to the target may be unreliable. Try lowering the TCLK setting before trying again. (Emulation package 8.1.0.00012)
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

Cortex_M4_0: Error occurred during flash operation: Could not read register R2: target is not connected
Cortex_M4_0: Flash Programmer: Error while writing to Flash memory
Cortex_M4_0: File Loader: Memory write failed: Unknown error
Cortex_M4_0: GEL: File: C:\Users\mypath\dbg\my_project.out: Load failed.

When I use the Test Connection button in the ccxml file, the SWD test passes. 

The jumper is setup for SOP mode to (2-1-0): 0-0-1 

I believe this problem may have first manifested after we flashed a build that is OTA capable with dummy keys/certs. Is it possible that the bootloader is unhappy about something (bad keys?) and somehow interfering with the ability of jtag to take over the processor? An incorrect setting in the Debug Configuration? Grasping at straws here...

Thanks,

Katie

  • Katie,

    The second error above is the most troublesome, as it is related to the state of the device's internal flash. I am not very familiar with this particular device, but I wonder if there is code allocated to invalid memory areas that are disrupting the device's stability (a common issue would be scribbling data into register areas, for example). That would require some advice from the device experts. 

    Regarding the third error, the SOP jumper mode (Flash/Func) requires the Debug Probe to be configured to use four wire JTAG.

    Specifically for the first error with the Jlink, choose the CC3220_SWD device (as mentioned in the other thread) and set the protocol as the following: 

    That said, I would keep the tests with the XDS110 built into the Launchpad until you get a more stable code loading process. 

    Hope this helps,

    Rafael

  • I don't have those settings for Target Configuration. Is that a new change? We haven't updated for a couple months. Here's what I have:

    Thanks,

    Katie

  • Katie,

    That is just for the Segger Jlink. The XDS Debug Probes are configured directly on the Debug Probe branch. 

    Regards,

    Rafael